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
How do I debug an extension?
Is python a good first language?
Tell us which python function will you use to convert a number to a string?
What is a model in python?
Please explain what are the rules for local and global variables in python?
Why cannot lambda forms in Python contain statements?
Consider multiple inheritances here. Suppose class c inherits from classes a and b as class c(a,b). Classes a and b both have their own versions of method func(). If we call func() from an object of class c, which version gets invoked?
What does super () do python?
What are the components of python memory manager?
What does while 1 mean in python?
What is the difference between ‘match’ and ‘search’ in python?
What is pass in Python?
Explain how you can access sessions in flask?
What is string slicing in python?
What is += in python mean?