kliment / Printrun

Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software
GNU General Public License v3.0
2.38k stars 996 forks source link

Why are you using while+time.sleep for sync ? #1264

Closed hl037 closed 2 years ago

hl037 commented 2 years ago

Hi, I am reading a bit or printrun sources, and I was wondering why are you using while+time.sleep() instead of other thread sync mechanism ? (in printcore.py)

volconst commented 2 years ago

Probably because it is easier, more accessible. Maybe other mechanisms require changing both threads. Give an example code for a better way?