Last active
June 12, 2019 14:40
-
-
Save joar/706c71ffcbc5fd741b7ab9aaadc4efea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import dill | |
def main(): | |
lock = threading.RLock() | |
dill_lock = dill.loads(dill.dumps(lock)) | |
print(dill_lock) # Prints as "unlocked" | |
dill_lock.acquire() # Blocks forever | |
print("If I was brave enough I would call rm -rf / here.") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment