Closed fanatid closed 10 years ago
Lock is unnecessary for thread-safety, as reading or replacing a single instance attribute is atomic in Python.
As for exiting faster, it works, but more frequent thread wakeups are somewhat undesirable, as they drain laptop's power, for example. (One such thread is hardly an issue, but usually a lot of apps sit in background, and a hundred of such "somewhat busy waiting" threads can have serious impact on battery drain and overall CPU performance.)