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 is __ init__ in python?

439


Explain how can you generate random numbers in python?

465


How do you split a string in python?

448


What is egg and wheel in python?

445


Is self mandatory in python?

432






What is the use of python interpreter?

386


What program to write python?

425


What is python console?

449


Multiply all elements of a list without writing a loop?

489


What is django python?

436


Explain different way to trigger/ raise exception in your python script?

501


What is the method does join() in python belong?

505


How do I watch a file for changes using python?

466


Do lists start at 0 or 1?

430


What is polymorphism in python with example?

501