Simple assignment to simple variables is “atomic” AKA threadsafe (compound assignments such as +=
or assignments to items or attributes of objects need not be, but your example is a simple assignment to a simple, albeit global, variable, thus safe).
More Related Contents:
- How do I capture SIGINT in Python?
- How to handle a signal.SIGINT on a Windows OS machine?
- python: windows equivalent of SIGALRM
- Catch Ctrl+C / SIGINT and exit multiprocesses gracefully in python [duplicate]
- Django: signal when user logs in?
- Python: Catch Ctrl-C command. Prompt “really want to quit (y/n)”, resume execution if no
- How do I prevent fixtures from conflicting with django post_save signal code?
- Kill or terminate subprocess when timeout?
- How can I send a signal from a python program?
- Accessing the user’s request in a post_save signal
- How to signal slots in a GUI from a different process?
- Pausing a process?
- Understanding scipy deconvolve
- How do you find the number of letters in a word in python? [duplicate]
- How to search and replace text in a file?
- How to access variables from different classes in tkinter?
- Why is the PyGame animation is flickering
- How can I add new dimensions to a Numpy array?
- Why is the global keyword not required in this case?
- How to reinstall python@2 from Homebrew?
- Wrapping long y labels in matplotlib tight layout using setp
- Convert a python dict to a string and back
- Check if two 3D numpy arrays contain overlapping 2D arrays
- Adding two Series with NaNs
- Multi-factor authentication (password and key) with Paramiko
- Remove an item from a dictionary when its key is unknown
- how to annotate heatmap with text in matplotlib
- Share data between IPython Notebooks
- Python’s and Numpy’s nan and set
- Why am I getting NotImplementedError with async and await on Windows?