Skip to content
aktechPublic

About

A talk on Global Interpreter Lock in Python

Topics

Resources

Stars

13 stars

Watchers

1 watching

Forks

Repository files navigation

GIL Talk

GIL Talk Demo

A talk on Global Interpreter lock.

Contents

Functions threads API

$ python python_multithreading/function_threads.py

Class based threads API

$ python python_multithreading/class_threads.py

Extension Module

Python C extension module is written in src/python_c_extension/extension_module.c. To build and install it into the current environment, run from the repo root:

$ pip install .

The function defined in extensions module is used in c_extension_gil.py, run it as following:

$ python -m python_c_extension.c_extension_gil
Single Thread: 2.118302
Two Threads:   1.348021

Compile and run C Threads

  • compile
$ g++ cpp_multithreading/c_threads.cpp -o cpp_multithreading/c_threads
  • run
$ ./cpp_multithreading/c_threads

Acknowledgement

Thanks to Garvit and Suhaib, who played a vital role in the preparation of this presentation.

About

A talk on Global Interpreter Lock in Python

Topics

Resources

Stars

13 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages