%% Tags: #readwise2directory Last Updated: [[2021-02-04]] %% # Tweets From Will McGugan [Readwise URL](https://readwise.io/bookreview/7538289) | [Source URL](https://twitter.com/willmcgugan) --- ![](https://pbs.twimg.com/profile_images/1262031186844680193/QjAc-1Kq.jpg) --- > A Python tip I don't think I've come across before. > \ > Don't use sleep() in threads. > \ > Why? They can't be interrupted. If you want to wait 60 seconds between tasks you can't exit the sleep prematurely. > \ > Solution? Use threading.Event and wait(). Set the event to interrupt the sleep. ^141246241 ---