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 to add values to a python array?
What are local variables in python?
Tell me how does the ternary operator work in python?
Explain about multi-threading concept in python?
Is python numpy better than lists?
Write one line of code to get a list of names that start with character ājā?
Which linux is best for python programming?
Explain the database connection in python flask?
Which module is used to control the gpio in python?
Explain ternary operator in python?
Where is python best used?
Which ide is better for python?
What is the difference between the shallow copy and deep copy in python?
Which is better java or python?
What is the purpose of bytes() in python?