A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-September/056424.html below:

[Python-Dev] Variant of removing GIL.

[Python-Dev] Variant of removing GIL.Sokolov Yura falcon at intercable.ru
Thu Sep 15 09:47:38 CEST 2005
Corrections:

Now, every thread keeps one n queue of objects to incref and second 
queue to decref.
Both can be implemented as array, cause they will be freed at once.

Initially, every thread acquires GIL for "read".
Py_INCREF places a ref into a incref queue of a thread,
Py_DECREF places a ref into a decref queue of a thread.
When queue has became full or "100" instruction left ( :-) , it usefull),
thread releases GIL for "read" and acquires for "write",
when first process acquire it he:
      walk throw all incref queues in all threads, incref all thouse 
refs, and clear queues.
      then walk throw all decref queues in all threads, decref all 
thouse refs, and clear queues
After all he acquires GIL for "read". Other processes could stupidly 
repeat it founding clear queues.
Since there only one thread works as a "garbage collector", we will not 
loose any incref and decref.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4