How does global value mutation used for thread-safety?
Answer Posted / chaitanya
The global interpreter lock is used to allow the running of the thread one at a time. This is internal to the program only and used to distribute the functionality along all the virtual machines that are used. Python allows the switching between the threads to be performed by using the byte code instructions that are used to provide platform-independence. The sys.setcheckinterval() method is used that allow the switching to occur during the implementation of the program and the instruction. This provides the understanding in the field of accounting to use the byte code implementation that makes it portable to use. The atomicity can be provided such that the shared variables can be given as built-in data types.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain about different blocks in exception handling?
Python or r: which one would you prefer for text analytics?
How can I evaluate an arbitrary python expression from c?
How do I avoid having python class data shared among instances?
What will be the output of the code:def foo (i=[])?
How to remove duplicates from a list in python ?
How does exception handling in python differ from java?
What is anaconda program?
How will you remove all leading and trailing whitespace in string in python?
Is python better than bash?
How does python compare string and int?
Difference between @staticmethod and @classmethod in python?
What is the different between range () and xrange () functions in python?
Where is python used in real world?
What’s your preferred text editor?