You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first operation launches a Python operation in a background thread (using an existing thread in libuv's pool).
Python however is a single-threaded interpreter with a limited shared-memory multi-threading support - but not one which involves actually simultaneously interpreting Python code. Be sure to read Async in the wiki.
This means that the second line will effectively block the event loop until the first operation concludes. A small, but notable exception to this rule is native Python extensions like numpy which release the Python GIL while running C code.
No Python object can be accessed while a Python background operation is running.
This is a fundamental Python limitation that is unlikely to go away in a foreseeable future.
The text was updated successfully, but these errors were encountered:
Consider the following scenario:
The first operation launches a Python operation in a background thread (using an existing thread in
libuv
's pool).Python however is a single-threaded interpreter with a limited shared-memory multi-threading support - but not one which involves actually simultaneously interpreting Python code. Be sure to read
Async
in the wiki.This means that the second line will effectively block the event loop until the first operation concludes.
A small, but notable exception to this rule is native Python extensions like
numpy
which release the Python GIL while running C code.No Python object can be accessed while a Python background operation is running.
This is a fundamental Python limitation that is unlikely to go away in a foreseeable future.
The text was updated successfully, but these errors were encountered: