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


Please Help Members By Posting Answers For Below Questions

What are the python types?

441


Write a program to produce fibonacci series in python.

452


What are the different file processing modes supported by python?

499


What do you understand by mutable and immutable in python?

445


If given the first and last names of bunch of employees how would you store it and what datatype?

505






Is python case-sensitive?

490


Is javascript harder than python?

437


What do you mean by list comprehension in python?

474


How to remove whitespaces from a string in python?

467


Explain when is the python decorator used?

462


Can you make a python executable?

426


Does python interact with database?

464


How do I install pip on windows?

497


What is self in oop of python?

462


When do you choose a list over a tuple?

461