What is GIL?

Answers were Sorted based on User's Feedback



What is GIL?..

Answer / nashiinformaticssolutions

GIL (Global Interpreter Lock) is a mutex that protects access to Python objects, preventing multiple native threads from executing Python bytecodes at once. It ensures that only one thread can execute Python code at a time, which can be a limitation in CPU-bound multi-threaded programs but does not significantly affect I/O-bound programs.

Is This Answer Correct ?    0 Yes 0 No

What is GIL?..

Answer / glibwaresoftsolutions

GIL (Global Interpreter Lock) is a mutex that protects access to Python objects, preventing multiple native threads from executing Python bytecodes at once. It ensures that only one thread can execute Python code at a time, which can be a limitation in CPU-bound multi-threaded programs but does not significantly affect I/O-bound programs.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is the difference between `__str__` and `__repr__` methods in Python?

1 Answers  


Is java better than python?

0 Answers  


How to convert a numpy array to a python list?

0 Answers  


Why isn't there a switch or case statement in python?

0 Answers  


How would you generate a random number in python?

0 Answers  






How to create an empty class in python?

0 Answers  


What are the principal differences between the lambda and def?

0 Answers  


Do you know what is numpy and how is it better than a list in python?

0 Answers  


What is lambda function ?

0 Answers  


What is the usage of dir() and dir() function in python?

0 Answers  


What is the use of assertions in python?

0 Answers  


Is python good for microservices?

0 Answers  


Categories