chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
92500c81-271f-425d-8a79-25117ac6c894
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,595
supabase-export-v2
d357b69b03258cd5
Using locks, conditions, and semaphores in the :keyword:`!with` statement ------------------------------------------------------------------------- All of the objects provided by this module that have ``acquire`` and ``release`` methods can be used as context managers for a :keyword:`with` statement. The ``acquire`` me...
trusted_official_docs
CPython Docs
Using locks, conditions, and semaphores in the :keyword:`!with` statement ------------------------------------------------------------------------- All of the objects provided by this module that have ``acquire`` and ``release`` methods can be used as context managers for a :keyword:`with` statement. The ``acquire`` me...
Using locks, conditions, and semaphores in the :keyword:`!with` statement ------------------------------------------------------------------------- All of the objects provided by this module that have ``acquire`` and ``release`` methods can be used as context managers for a :keyword:`with` statement. The ``acquire`` me...
python, official-docs, cpython, P0
Local_Trusted_Corpus
92e298a5-c010-4125-90f9-949591b1da1f
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,234
supabase-export-v2
e0de5def7342924e
.. impl-detail:: In CPython, due to the :term:`Global Interpreter Lock <global interpreter lock>`, only one thread can execute Python code at once (even though certain performance-oriented libraries might overcome this limitation). If you want your application to make better use of the computational resources of mu...
trusted_official_docs
CPython Docs
.. impl-detail:: In CPython, due to the :term:`Global Interpreter Lock <global interpreter lock>`, only one thread can execute Python code at once (even though certain performance-oriented libraries might overcome this limitation). If you want your application to make better use of the computational resources of mu...
.. impl-detail:: In CPython, due to the :term:`Global Interpreter Lock <global interpreter lock>`, only one thread can execute Python code at once (even though certain performance-oriented libraries might overcome this limitation). If you want your application to make better use of the computational resources of mu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
95a34a7a-105f-4201-a5b1-261654bab103
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,312
supabase-export-v2
e6e89025f27e76c3
>>> log = [] >>> def f(): ... items = sorted(mydata.__dict__.items()) ... log.append(items) ... mydata.number = 11 ... log.append(mydata.number) >>> import threading >>> thread = threading.Thread(target=f) >>> thread.start() >>> thread.join() >>> log [[], 11]
trusted_official_docs
CPython Docs
>>> log = [] >>> def f(): ... items = sorted(mydata.__dict__.items()) ... log.append(items) ... mydata.number = 11 ... log.append(mydata.number) >>> import threading >>> thread = threading.Thread(target=f) >>> thread.start() >>> thread.join() >>> log [[], 11]
>>> log = [] >>> def f(): ... items = sorted(mydata.__dict__.items()) ... log.append(items) ... mydata.number = 11 ... log.append(mydata.number) >>> import threading >>> thread = threading.Thread(target=f) >>> thread.start() >>> thread.join() >>> log [[], 11]
python, official-docs, cpython, P0
Local_Trusted_Corpus
99b15099-3db0-4bcd-a8d5-688d99d11bd8
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,295
supabase-export-v2
2e260cd9afd6b4d9
and the stack size is unmodified. 32 KiB is currently the minimum supported stack size value to guarantee sufficient stack space for the interpreter itself. Note that some platforms may have particular restrictions on values for the stack size, such as requiring a minimum stack size > 32 KiB or requiring allocation i...
trusted_official_docs
CPython Docs
and the stack size is unmodified. 32 KiB is currently the minimum supported stack size value to guarantee sufficient stack space for the interpreter itself. Note that some platforms may have particular restrictions on values for the stack size, such as requiring a minimum stack size > 32 KiB or requiring allocation i...
and the stack size is unmodified. 32 KiB is currently the minimum supported stack size value to guarantee sufficient stack space for the interpreter itself. Note that some platforms may have particular restrictions on values for the stack size, such as requiring a minimum stack size > 32 KiB or requiring allocation i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9ad72996-e4af-4100-8ea1-33ceb16e90d7
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,410
supabase-export-v2
6cb6ca444204d1cb
.. class:: Lock() The class implementing primitive lock objects. Once a thread has acquired a lock, subsequent attempts to acquire it block, until it is released; any thread may release it.
trusted_official_docs
CPython Docs
.. class:: Lock() The class implementing primitive lock objects. Once a thread has acquired a lock, subsequent attempts to acquire it block, until it is released; any thread may release it.
.. class:: Lock() The class implementing primitive lock objects. Once a thread has acquired a lock, subsequent attempts to acquire it block, until it is released; any thread may release it.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9cab6d9f-5c06-4003-9906-8ee71ff1fea6
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,631
supabase-export-v2
561014e17e0a04a1
to be consumed by one thread at a time. If a single derived iterator must itself be shared by multiple threads, wrap it with :class:`serialize_iterator`. If *n* is ``0``, return an empty tuple. If *n* is negative, raise :exc:`ValueError`.
trusted_official_docs
CPython Docs
to be consumed by one thread at a time. If a single derived iterator must itself be shared by multiple threads, wrap it with :class:`serialize_iterator`. If *n* is ``0``, return an empty tuple. If *n* is negative, raise :exc:`ValueError`.
to be consumed by one thread at a time. If a single derived iterator must itself be shared by multiple threads, wrap it with :class:`serialize_iterator`. If *n* is ``0``, return an empty tuple. If *n* is negative, raise :exc:`ValueError`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9d9c4ce2-aef4-40a2-885e-7f1b13479847
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,469
supabase-export-v2
a0060b7764cded01
# Produce one item with cv: make_an_item_available() cv.notify() The ``while`` loop checking for the application's condition is necessary because :meth:`~Condition.wait` can return after an arbitrary long time, and the condition which prompted the :meth:`~Condition.notify` call may no longer hold true. This is inherent...
trusted_official_docs
CPython Docs
# Produce one item with cv: make_an_item_available() cv.notify() The ``while`` loop checking for the application's condition is necessary because :meth:`~Condition.wait` can return after an arbitrary long time, and the condition which prompted the :meth:`~Condition.notify` call may no longer hold true. This is inherent...
# Produce one item with cv: make_an_item_available() cv.notify() The ``while`` loop checking for the application's condition is necessary because :meth:`~Condition.wait` can return after an arbitrary long time, and the condition which prompted the :meth:`~Condition.notify` call may no longer hold true. This is inherent...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9f6313b9-eb44-4a52-8050-4fe5dbf17d43
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,375
supabase-export-v2
8b0304e2b56463f3
``None``, you must call :meth:`~Thread.is_alive` after :meth:`~Thread.join` to decide whether a timeout happened -- if the thread is still alive, the :meth:`~Thread.join` call timed out. When the *timeout* argument is not present or ``None``, the operation will block until the thread terminates.
trusted_official_docs
CPython Docs
``None``, you must call :meth:`~Thread.is_alive` after :meth:`~Thread.join` to decide whether a timeout happened -- if the thread is still alive, the :meth:`~Thread.join` call timed out. When the *timeout* argument is not present or ``None``, the operation will block until the thread terminates.
``None``, you must call :meth:`~Thread.is_alive` after :meth:`~Thread.join` to decide whether a timeout happened -- if the thread is still alive, the :meth:`~Thread.join` call timed out. When the *timeout* argument is not present or ``None``, the operation will block until the thread terminates.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a0879ca4-1c3a-4be4-b932-af90d7871073
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,498
supabase-export-v2
505dba46ac5cec22
thread waiting on this condition, if any. If the calling thread has not acquired the lock when this method is called, a :exc:`RuntimeError` is raised. This method wakes up at most *n* of the threads waiting for the condition variable; it is a no-op if no threads are waiting.
trusted_official_docs
CPython Docs
thread waiting on this condition, if any. If the calling thread has not acquired the lock when this method is called, a :exc:`RuntimeError` is raised. This method wakes up at most *n* of the threads waiting for the condition variable; it is a no-op if no threads are waiting.
thread waiting on this condition, if any. If the calling thread has not acquired the lock when this method is called, a :exc:`RuntimeError` is raised. This method wakes up at most *n* of the threads waiting for the condition variable; it is a no-op if no threads are waiting.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a1914dac-315d-4901-9f8a-f6554e57f333
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,394
supabase-export-v2
af11e7d3ddb49d8e
Similar to Process IDs, Thread IDs are only valid (guaranteed unique system-wide) from the time the thread is created until the thread has been terminated. .. availability:: Windows, FreeBSD, Linux, macOS, OpenBSD, NetBSD, AIX, DragonFlyBSD.
trusted_official_docs
CPython Docs
Similar to Process IDs, Thread IDs are only valid (guaranteed unique system-wide) from the time the thread is created until the thread has been terminated. .. availability:: Windows, FreeBSD, Linux, macOS, OpenBSD, NetBSD, AIX, DragonFlyBSD.
Similar to Process IDs, Thread IDs are only valid (guaranteed unique system-wide) from the time the thread is created until the thread has been terminated. .. availability:: Windows, FreeBSD, Linux, macOS, OpenBSD, NetBSD, AIX, DragonFlyBSD.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a1aaeee0-36f3-4c4b-8257-750d4febe489
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,553
supabase-export-v2
ceceefa0159fd6dd
of time has passed --- a timer. :class:`Timer` is a subclass of :class:`Thread` and as such also functions as an example of creating custom threads. Timers are started, as with threads, by calling their :meth:`Timer.start <Thread.start>` method. The timer can be stopped (before its action has begun) by calling the :met...
trusted_official_docs
CPython Docs
of time has passed --- a timer. :class:`Timer` is a subclass of :class:`Thread` and as such also functions as an example of creating custom threads. Timers are started, as with threads, by calling their :meth:`Timer.start <Thread.start>` method. The timer can be stopped (before its action has begun) by calling the :met...
of time has passed --- a timer. :class:`Timer` is a subclass of :class:`Thread` and as such also functions as an example of creating custom threads. Timers are started, as with threads, by calling their :meth:`Timer.start <Thread.start>` method. The timer can be stopped (before its action has begun) by calling the :met...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a3017dad-47ea-40d0-b0b6-b03085492d42
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,581
supabase-export-v2
fc7d798f3662b9f5
Return the barrier to the default, empty state. Any threads waiting on it will receive the :class:`BrokenBarrierError` exception. Note that using this function may require some external synchronization if there are other threads whose state is unknown. If a barrier is broken it may be better to just leave it and crea...
trusted_official_docs
CPython Docs
Return the barrier to the default, empty state. Any threads waiting on it will receive the :class:`BrokenBarrierError` exception. Note that using this function may require some external synchronization if there are other threads whose state is unknown. If a barrier is broken it may be better to just leave it and crea...
Return the barrier to the default, empty state. Any threads waiting on it will receive the :class:`BrokenBarrierError` exception. Note that using this function may require some external synchronization if there are other threads whose state is unknown. If a barrier is broken it may be better to just leave it and crea...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a315c789-9de2-426a-ba61-d3572fcdd14a
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,378
supabase-export-v2
409ab51dba89a8e8
a deadlock. It is also an error to :meth:`~Thread.join` a thread before it has been started and attempts to do so raise the same exception. If an attempt is made to join a running daemonic thread in late stages of :term:`Python finalization <interpreter shutdown>` :meth:`!join` raises a :exc:`PythonFinalizationError`...
trusted_official_docs
CPython Docs
a deadlock. It is also an error to :meth:`~Thread.join` a thread before it has been started and attempts to do so raise the same exception. If an attempt is made to join a running daemonic thread in late stages of :term:`Python finalization <interpreter shutdown>` :meth:`!join` raises a :exc:`PythonFinalizationError`...
a deadlock. It is also an error to :meth:`~Thread.join` a thread before it has been started and attempts to do so raise the same exception. If an attempt is made to join a running daemonic thread in late stages of :term:`Python finalization <interpreter shutdown>` :meth:`!join` raises a :exc:`PythonFinalizationError`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a4b00746-179c-4250-86c0-c5d674142aaf
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,601
supabase-export-v2
7c465304c8e413f3
Iterator synchronization ------------------------ By default, Python iterators do not support concurrent access. Most iterators make no guarantees when accessed simultaneously from multiple threads. Generator iterators, for example, raise :exc:`ValueError` if one of their iterator methods is called while the generator ...
trusted_official_docs
CPython Docs
Iterator synchronization ------------------------ By default, Python iterators do not support concurrent access. Most iterators make no guarantees when accessed simultaneously from multiple threads. Generator iterators, for example, raise :exc:`ValueError` if one of their iterator methods is called while the generator ...
Iterator synchronization ------------------------ By default, Python iterators do not support concurrent access. Most iterators make no guarantees when accessed simultaneously from multiple threads. Generator iterators, for example, raise :exc:`ValueError` if one of their iterator methods is called while the generator ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a546b6b1-7b03-49b7-8fc7-36c313e05a4a
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,415
supabase-export-v2
943c48512fb38c82
When invoked with the *blocking* argument set to ``True`` (the default), block until the lock is unlocked, then set it to locked and return ``True``. When invoked with the *blocking* argument set to ``False``, do not block. If a call with *blocking* set to ``True`` would block, return ``False`` immediately; otherwise,...
trusted_official_docs
CPython Docs
When invoked with the *blocking* argument set to ``True`` (the default), block until the lock is unlocked, then set it to locked and return ``True``. When invoked with the *blocking* argument set to ``False``, do not block. If a call with *blocking* set to ``True`` would block, return ``False`` immediately; otherwise,...
When invoked with the *blocking* argument set to ``True`` (the default), block until the lock is unlocked, then set it to locked and return ``True``. When invoked with the *blocking* argument set to ``False``, do not block. If a call with *blocking* set to ``True`` would block, return ``False`` immediately; otherwise,...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a5d3fc8a-f4f4-4472-9aa0-c00cfaecce33
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,329
supabase-export-v2
4bd6b975bdebd0b5
>>> mydata.number 2 >>> mydata.color Traceback (most recent call last): ... AttributeError: 'MyLocal' object has no attribute 'color' Note that subclasses can define :term:`__slots__`, but they are not thread local. They are shared across threads::
trusted_official_docs
CPython Docs
>>> mydata.number 2 >>> mydata.color Traceback (most recent call last): ... AttributeError: 'MyLocal' object has no attribute 'color' Note that subclasses can define :term:`__slots__`, but they are not thread local. They are shared across threads::
>>> mydata.number 2 >>> mydata.color Traceback (most recent call last): ... AttributeError: 'MyLocal' object has no attribute 'color' Note that subclasses can define :term:`__slots__`, but they are not thread local. They are shared across threads::
python, official-docs, cpython, P0
Local_Trusted_Corpus
a6498a78-2a4e-4102-a51f-c141e491f434
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,368
supabase-export-v2
d582adb206b0d2a1
object passed to the object's constructor as the *target* argument, if any, with positional and keyword arguments taken from the *args* and *kwargs* arguments, respectively. Using list or tuple as the *args* argument which passed to the :class:`Thread` could achieve the same effect.
trusted_official_docs
CPython Docs
object passed to the object's constructor as the *target* argument, if any, with positional and keyword arguments taken from the *args* and *kwargs* arguments, respectively. Using list or tuple as the *args* argument which passed to the :class:`Thread` could achieve the same effect.
object passed to the object's constructor as the *target* argument, if any, with positional and keyword arguments taken from the *args* and *kwargs* arguments, respectively. Using list or tuple as the *args* argument which passed to the :class:`Thread` could achieve the same effect.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a72e8c19-40ae-4011-b86b-fba87c2aeaf0
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,416
supabase-export-v2
85ab25bbceef6abd
do not block. If a call with *blocking* set to ``True`` would block, return ``False`` immediately; otherwise, set the lock to locked and return ``True``. When invoked with the *timeout* argument set to a positive value, block for at most the number of seconds specified by *timeout* and as long as the lock cannot be a...
trusted_official_docs
CPython Docs
do not block. If a call with *blocking* set to ``True`` would block, return ``False`` immediately; otherwise, set the lock to locked and return ``True``. When invoked with the *timeout* argument set to a positive value, block for at most the number of seconds specified by *timeout* and as long as the lock cannot be a...
do not block. If a call with *blocking* set to ``True`` would block, return ``False`` immediately; otherwise, set the lock to locked and return ``True``. When invoked with the *timeout* argument set to a positive value, block for at most the number of seconds specified by *timeout* and as long as the lock cannot be a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a7e0e35e-b41c-481e-9b81-8c9a76c80684
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,237
supabase-export-v2
00e13cb7ee761ee2
tasks, as only one thread can execute Python bytecode at a time. Despite this, threads remain a useful tool for achieving concurrency in many scenarios. As of Python 3.13, :term:`free-threaded <free threading>` builds can disable the GIL, enabling true parallel execution of threads, but this feature is not available by...
trusted_official_docs
CPython Docs
tasks, as only one thread can execute Python bytecode at a time. Despite this, threads remain a useful tool for achieving concurrency in many scenarios. As of Python 3.13, :term:`free-threaded <free threading>` builds can disable the GIL, enabling true parallel execution of threads, but this feature is not available by...
tasks, as only one thread can execute Python bytecode at a time. Despite this, threads remain a useful tool for achieving concurrency in many scenarios. As of Python 3.13, :term:`free-threaded <free threading>` builds can disable the GIL, enabling true parallel execution of threads, but this feature is not available by...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a8711379-de6e-485e-8a6a-bdde85ae6b0c
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,254
supabase-export-v2
505267ee5ba1f4f4
:func:`threading.excepthook` can be overridden to control how uncaught exceptions raised by :func:`Thread.run` are handled. Storing *exc_value* using a custom hook can create a reference cycle. It should be cleared explicitly to break the reference cycle when the exception is no longer needed.
trusted_official_docs
CPython Docs
:func:`threading.excepthook` can be overridden to control how uncaught exceptions raised by :func:`Thread.run` are handled. Storing *exc_value* using a custom hook can create a reference cycle. It should be cleared explicitly to break the reference cycle when the exception is no longer needed.
:func:`threading.excepthook` can be overridden to control how uncaught exceptions raised by :func:`Thread.run` are handled. Storing *exc_value* using a custom hook can create a reference cycle. It should be cleared explicitly to break the reference cycle when the exception is no longer needed.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a9bd2eda-4aea-4ae3-afce-cde24471d07d
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,256
supabase-export-v2
8fc7c04c072cfa2e
resurrect it if it is set to an object which is being finalized. Avoid storing *thread* after the custom hook completes to avoid resurrecting objects. .. seealso:: :func:`sys.excepthook` handles uncaught exceptions.
trusted_official_docs
CPython Docs
resurrect it if it is set to an object which is being finalized. Avoid storing *thread* after the custom hook completes to avoid resurrecting objects. .. seealso:: :func:`sys.excepthook` handles uncaught exceptions.
resurrect it if it is set to an object which is being finalized. Avoid storing *thread* after the custom hook completes to avoid resurrecting objects. .. seealso:: :func:`sys.excepthook` handles uncaught exceptions.
python, official-docs, cpython, P0
Local_Trusted_Corpus
aa4bad45-eba2-43a5-8c99-b2dc2d41f752
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,354
supabase-export-v2
77138cc603a7af76
*kwargs* is a dictionary of keyword arguments for the target invocation. Defaults to ``{}``. If not ``None``, *daemon* explicitly sets whether the thread is daemonic. If ``None`` (the default), the daemonic property is inherited from the current thread.
trusted_official_docs
CPython Docs
*kwargs* is a dictionary of keyword arguments for the target invocation. Defaults to ``{}``. If not ``None``, *daemon* explicitly sets whether the thread is daemonic. If ``None`` (the default), the daemonic property is inherited from the current thread.
*kwargs* is a dictionary of keyword arguments for the target invocation. Defaults to ``{}``. If not ``None``, *daemon* explicitly sets whether the thread is daemonic. If ``None`` (the default), the daemonic property is inherited from the current thread.
python, official-docs, cpython, P0
Local_Trusted_Corpus
acf0ef82-aad4-4180-a64f-1738f73bb1e4
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,306
supabase-export-v2
3e78274bde59fda9
Thread-local data ^^^^^^^^^^^^^^^^^ Thread-local data is data whose values are thread specific. If you have data that you want to be local to a thread, create a :class:`local` object and use its attributes::
trusted_official_docs
CPython Docs
Thread-local data ^^^^^^^^^^^^^^^^^ Thread-local data is data whose values are thread specific. If you have data that you want to be local to a thread, create a :class:`local` object and use its attributes::
Thread-local data ^^^^^^^^^^^^^^^^^ Thread-local data is data whose values are thread specific. If you have data that you want to be local to a thread, create a :class:`local` object and use its attributes::
python, official-docs, cpython, P0
Local_Trusted_Corpus
ae6b1b3c-98db-46a9-b8a2-4c95f5e6f98d
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,538
supabase-export-v2
96f5e8652a6ef408
.. class:: Event() Class implementing event objects. An event manages a flag that can be set to true with the :meth:`~Event.set` method and reset to false with the :meth:`clear` method. The :meth:`wait` method blocks until the flag is true. The flag is initially false.
trusted_official_docs
CPython Docs
.. class:: Event() Class implementing event objects. An event manages a flag that can be set to true with the :meth:`~Event.set` method and reset to false with the :meth:`clear` method. The :meth:`wait` method blocks until the flag is true. The flag is initially false.
.. class:: Event() Class implementing event objects. An event manages a flag that can be set to true with the :meth:`~Event.set` method and reset to false with the :meth:`clear` method. The :meth:`wait` method blocks until the flag is true. The flag is initially false.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b0fcdfc0-af28-45c3-ab71-bb974a113bbd
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,512
supabase-export-v2
7c90aaa57d0496a4
optional argument gives the initial *value* for the internal counter; it defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is raised. .. versionchanged:: 3.3 changed from a factory function to a class.
trusted_official_docs
CPython Docs
optional argument gives the initial *value* for the internal counter; it defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is raised. .. versionchanged:: 3.3 changed from a factory function to a class.
optional argument gives the initial *value* for the internal counter; it defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is raised. .. versionchanged:: 3.3 changed from a factory function to a class.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b40d3bce-2a66-450e-83d9-bd2247e74ab2
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,596
supabase-export-v2
f4fbe5a8547004c1
The ``acquire`` method will be called when the block is entered, and ``release`` will be called when the block is exited. Hence, the following snippet:: with some_lock: # do something...
trusted_official_docs
CPython Docs
The ``acquire`` method will be called when the block is entered, and ``release`` will be called when the block is exited. Hence, the following snippet:: with some_lock: # do something...
The ``acquire`` method will be called when the block is entered, and ``release`` will be called when the block is exited. Hence, the following snippet:: with some_lock: # do something...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b5700270-08fc-4d57-9c70-3ee9d6c47252
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,624
supabase-export-v2
91d645752d3decfb
t1 = threading.Thread(target=consume, args=("left", source)) t2 = threading.Thread(target=consume, args=("right", source)) t1.start() t2.start() t1.join() t2.join() The returned wrapper preserves the metadata of *func*, such as its name and wrapped function reference.
trusted_official_docs
CPython Docs
t1 = threading.Thread(target=consume, args=("left", source)) t2 = threading.Thread(target=consume, args=("right", source)) t1.start() t2.start() t1.join() t2.join() The returned wrapper preserves the metadata of *func*, such as its name and wrapped function reference.
t1 = threading.Thread(target=consume, args=("left", source)) t2 = threading.Thread(target=consume, args=("right", source)) t1.start() t2.start() t1.join() t2.join() The returned wrapper preserves the metadata of *func*, such as its name and wrapped function reference.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b5b7d014-222a-4de6-b766-bff4dc10b720
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,218
supabase-export-v2
9fbdfad8bfb5b0e9
Introduction ------------ The :mod:`!threading` module provides a way to run multiple `threads <https://en.wikipedia.org/wiki/Thread_(computing)>`_ (smaller units of a process) concurrently within a single process. It allows for the creation and management of threads, making it possible to execute tasks in parallel, sh...
trusted_official_docs
CPython Docs
Introduction ------------ The :mod:`!threading` module provides a way to run multiple `threads <https://en.wikipedia.org/wiki/Thread_(computing)>`_ (smaller units of a process) concurrently within a single process. It allows for the creation and management of threads, making it possible to execute tasks in parallel, sh...
Introduction ------------ The :mod:`!threading` module provides a way to run multiple `threads <https://en.wikipedia.org/wiki/Thread_(computing)>`_ (smaller units of a process) concurrently within a single process. It allows for the creation and management of threads, making it possible to execute tasks in parallel, sh...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b630248c-8b4e-4dd4-93ad-00fb708108af
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,258
supabase-export-v2
8bdc9e168e68e2f7
.. data:: __excepthook__ Holds the original value of :func:`threading.excepthook`. It is saved so that the original value can be restored in case they happen to get replaced with broken or alternative objects.
trusted_official_docs
CPython Docs
.. data:: __excepthook__ Holds the original value of :func:`threading.excepthook`. It is saved so that the original value can be restored in case they happen to get replaced with broken or alternative objects.
.. data:: __excepthook__ Holds the original value of :func:`threading.excepthook`. It is saved so that the original value can be restored in case they happen to get replaced with broken or alternative objects.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b97b078b-b069-4983-a58f-2d68dfcadab5
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,343
supabase-export-v2
52a5fe7b25d9d975
If the :meth:`~Thread.run` method raises an exception, :func:`threading.excepthook` is called to handle it. By default, :func:`threading.excepthook` ignores silently :exc:`SystemExit`. A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon th...
trusted_official_docs
CPython Docs
If the :meth:`~Thread.run` method raises an exception, :func:`threading.excepthook` is called to handle it. By default, :func:`threading.excepthook` ignores silently :exc:`SystemExit`. A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon th...
If the :meth:`~Thread.run` method raises an exception, :func:`threading.excepthook` is called to handle it. By default, :func:`threading.excepthook` ignores silently :exc:`SystemExit`. A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b98dfdde-91e8-4da6-84d7-ddecd228d427
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,516
supabase-export-v2
34a81b4f742d79d3
When invoked without arguments: * If the internal counter is larger than zero on entry, decrement it by one and return ``True`` immediately. * If the internal counter is zero on entry, block until awoken by a call to :meth:`~Semaphore.release`. Once awoken (and the counter is greater than 0), decrement the counter b...
trusted_official_docs
CPython Docs
When invoked without arguments: * If the internal counter is larger than zero on entry, decrement it by one and return ``True`` immediately. * If the internal counter is zero on entry, block until awoken by a call to :meth:`~Semaphore.release`. Once awoken (and the counter is greater than 0), decrement the counter b...
When invoked without arguments: * If the internal counter is larger than zero on entry, decrement it by one and return ``True`` immediately. * If the internal counter is zero on entry, block until awoken by a call to :meth:`~Semaphore.release`. Once awoken (and the counter is greater than 0), decrement the counter b...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b9bb9b6f-f5ed-41a8-993d-a053cf6e2156
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,550
supabase-export-v2
7e07ea369a41d60e
the timeout argument is present and not ``None``, it should be a real number specifying a timeout for the operation in seconds, or fractions thereof. .. versionchanged:: 3.1 Previously, the method always returned ``None``.
trusted_official_docs
CPython Docs
the timeout argument is present and not ``None``, it should be a real number specifying a timeout for the operation in seconds, or fractions thereof. .. versionchanged:: 3.1 Previously, the method always returned ``None``.
the timeout argument is present and not ``None``, it should be a real number specifying a timeout for the operation in seconds, or fractions thereof. .. versionchanged:: 3.1 Previously, the method always returned ``None``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
bb8031af-33ba-49d5-a4dc-66855c8a67e3
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,629
supabase-export-v2
b84083fb41a5be4a
where the source iterator may feed consumers running in different threads. Each returned iterator yields every value from the underlying iterable, in the same order. Internally, values are buffered until every derived iterator has consumed them.
trusted_official_docs
CPython Docs
where the source iterator may feed consumers running in different threads. Each returned iterator yields every value from the underlying iterable, in the same order. Internally, values are buffered until every derived iterator has consumed them.
where the source iterator may feed consumers running in different threads. Each returned iterator yields every value from the underlying iterable, in the same order. Internally, values are buffered until every derived iterator has consumed them.
python, official-docs, cpython, P0
Local_Trusted_Corpus
bd802c62-e3d9-4e3b-9dcf-6d8e2d7ba972
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,455
supabase-export-v2
d5eb9f0a7813ef26
.. method:: release() Release a lock, decrementing the recursion level. If after the decrement it is zero, reset the lock to unlocked (not owned by any thread), and if any other threads are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed. If after the decrement the recursion lev...
trusted_official_docs
CPython Docs
.. method:: release() Release a lock, decrementing the recursion level. If after the decrement it is zero, reset the lock to unlocked (not owned by any thread), and if any other threads are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed. If after the decrement the recursion lev...
.. method:: release() Release a lock, decrementing the recursion level. If after the decrement it is zero, reset the lock to unlocked (not owned by any thread), and if any other threads are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed. If after the decrement the recursion lev...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c88f0c40-a837-4efa-b219-d000f639fcf4
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,346
supabase-export-v2
e935aa1fa841ebe0
There is a "main thread" object; this corresponds to the initial thread of control in the Python program. It is not a daemon thread. There is the possibility that "dummy thread objects" are created. These are thread objects corresponding to "alien threads", which are threads of control started outside the threading mod...
trusted_official_docs
CPython Docs
There is a "main thread" object; this corresponds to the initial thread of control in the Python program. It is not a daemon thread. There is the possibility that "dummy thread objects" are created. These are thread objects corresponding to "alien threads", which are threads of control started outside the threading mod...
There is a "main thread" object; this corresponds to the initial thread of control in the Python program. It is not a daemon thread. There is the possibility that "dummy thread objects" are created. These are thread objects corresponding to "alien threads", which are threads of control started outside the threading mod...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c9a14a78-efad-4e1a-995e-f9f31dfa7a82
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,533
supabase-export-v2
1a4ddaeeb9ee331b
with pool_sema: conn = connectdb() try: # ... use connection ... finally: conn.close() The use of a bounded semaphore reduces the chance that a programming error which causes the semaphore to be released more than it's acquired will go undetected.
trusted_official_docs
CPython Docs
with pool_sema: conn = connectdb() try: # ... use connection ... finally: conn.close() The use of a bounded semaphore reduces the chance that a programming error which causes the semaphore to be released more than it's acquired will go undetected.
with pool_sema: conn = connectdb() try: # ... use connection ... finally: conn.close() The use of a bounded semaphore reduces the chance that a programming error which causes the semaphore to be released more than it's acquired will go undetected.
python, official-docs, cpython, P0
Local_Trusted_Corpus
caf71e27-3089-4f62-b8c3-174e7a2ed046
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,475
supabase-export-v2
5f5e9d645b992f2f
:class:`Lock` or :class:`RLock` object, and it is used as the underlying lock. Otherwise, a new :class:`RLock` object is created and used as the underlying lock. .. versionchanged:: 3.3 changed from a factory function to a class.
trusted_official_docs
CPython Docs
:class:`Lock` or :class:`RLock` object, and it is used as the underlying lock. Otherwise, a new :class:`RLock` object is created and used as the underlying lock. .. versionchanged:: 3.3 changed from a factory function to a class.
:class:`Lock` or :class:`RLock` object, and it is used as the underlying lock. Otherwise, a new :class:`RLock` object is created and used as the underlying lock. .. versionchanged:: 3.3 changed from a factory function to a class.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cb598641-206e-4a7f-beb6-5b87ac16a5e2
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,318
supabase-export-v2
07f73103f84d6966
>>> class MyLocal(local): ... number = 2 ... def __init__(self, /, **kw): ... self.__dict__.update(kw) ... def squared(self): ... return self.number ** 2 This can be useful to support default values, methods and initialization. Note that if you define an :py:meth:`~object.__init__` method, it will be called each time t...
trusted_official_docs
CPython Docs
>>> class MyLocal(local): ... number = 2 ... def __init__(self, /, **kw): ... self.__dict__.update(kw) ... def squared(self): ... return self.number ** 2 This can be useful to support default values, methods and initialization. Note that if you define an :py:meth:`~object.__init__` method, it will be called each time t...
>>> class MyLocal(local): ... number = 2 ... def __init__(self, /, **kw): ... self.__dict__.update(kw) ... def squared(self): ... return self.number ** 2 This can be useful to support default values, methods and initialization. Note that if you define an :py:meth:`~object.__init__` method, it will be called each time t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cc53c827-0d39-499b-9a3e-4aa580cb5e1f
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,373
supabase-export-v2
9b22ce7539970c4b
.. method:: join(timeout=None) Wait until the thread terminates. This blocks the calling thread until the thread whose :meth:`~Thread.join` method is called terminates -- either normally or through an unhandled exception -- or until the optional timeout occurs.
trusted_official_docs
CPython Docs
.. method:: join(timeout=None) Wait until the thread terminates. This blocks the calling thread until the thread whose :meth:`~Thread.join` method is called terminates -- either normally or through an unhandled exception -- or until the optional timeout occurs.
.. method:: join(timeout=None) Wait until the thread terminates. This blocks the calling thread until the thread whose :meth:`~Thread.join` method is called terminates -- either normally or through an unhandled exception -- or until the optional timeout occurs.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cd9647a6-e4f1-4828-8d8c-e499b3a9fd58
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,245
supabase-export-v2
ab34e2ccb2869baa
.. function:: current_thread() Return the current :class:`Thread` object, corresponding to the caller's thread of control. If the caller's thread of control was not created through the :mod:`!threading` module, a dummy thread object with limited functionality is returned.
trusted_official_docs
CPython Docs
.. function:: current_thread() Return the current :class:`Thread` object, corresponding to the caller's thread of control. If the caller's thread of control was not created through the :mod:`!threading` module, a dummy thread object with limited functionality is returned.
.. function:: current_thread() Return the current :class:`Thread` object, corresponding to the caller's thread of control. If the caller's thread of control was not created through the :mod:`!threading` module, a dummy thread object with limited functionality is returned.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cd9bd4b3-379d-4095-bcef-bfa468230e45
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,474
supabase-export-v2
9da2803c873bbeef
This class implements condition variable objects. A condition variable allows one or more threads to wait until they are notified by another thread. If the *lock* argument is given and not ``None``, it must be a :class:`Lock` or :class:`RLock` object, and it is used as the underlying lock. Otherwise, a new :class:`RL...
trusted_official_docs
CPython Docs
This class implements condition variable objects. A condition variable allows one or more threads to wait until they are notified by another thread. If the *lock* argument is given and not ``None``, it must be a :class:`Lock` or :class:`RLock` object, and it is used as the underlying lock. Otherwise, a new :class:`RL...
This class implements condition variable objects. A condition variable allows one or more threads to wait until they are notified by another thread. If the *lock* argument is given and not ``None``, it must be a :class:`Lock` or :class:`RLock` object, and it is used as the underlying lock. Otherwise, a new :class:`RL...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cda5961d-c5d4-4203-9157-fb7429bf5ddd
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,470
supabase-export-v2
fa3be8f95b97198e
hold true. This is inherent to multi-threaded programming. The :meth:`~Condition.wait_for` method can be used to automate the condition checking, and eases the computation of timeouts:: # Consume an item with cv: cv.wait_for(an_item_is_available) get_an_available_item()
trusted_official_docs
CPython Docs
hold true. This is inherent to multi-threaded programming. The :meth:`~Condition.wait_for` method can be used to automate the condition checking, and eases the computation of timeouts:: # Consume an item with cv: cv.wait_for(an_item_is_available) get_an_available_item()
hold true. This is inherent to multi-threaded programming. The :meth:`~Condition.wait_for` method can be used to automate the condition checking, and eases the computation of timeouts:: # Consume an item with cv: cv.wait_for(an_item_is_available) get_an_available_item()
python, official-docs, cpython, P0
Local_Trusted_Corpus
ce1aa945-1cee-44a8-a55c-e6d28c891e71
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,628
supabase-export-v2
a8a34b6b7bf3319b
Return *n* independent iterators from a single input *iterable*, with guaranteed behavior when the derived iterators are consumed concurrently. This function is similar to :func:`itertools.tee`, but is intended for cases where the source iterator may feed consumers running in different threads. Each returned iterator ...
trusted_official_docs
CPython Docs
Return *n* independent iterators from a single input *iterable*, with guaranteed behavior when the derived iterators are consumed concurrently. This function is similar to :func:`itertools.tee`, but is intended for cases where the source iterator may feed consumers running in different threads. Each returned iterator ...
Return *n* independent iterators from a single input *iterable*, with guaranteed behavior when the derived iterators are consumed concurrently. This function is similar to :func:`itertools.tee`, but is intended for cases where the source iterator may feed consumers running in different threads. Each returned iterator ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ceea2503-893e-4655-b403-43cfc3beb224
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,630
supabase-export-v2
93123e09f48e3612
Internally, values are buffered until every derived iterator has consumed them. The returned iterators share the same underlying synchronization lock. Each individual derived iterator is intended to be consumed by one thread at a time. If a single derived iterator must itself be shared by multiple threads, wrap it w...
trusted_official_docs
CPython Docs
Internally, values are buffered until every derived iterator has consumed them. The returned iterators share the same underlying synchronization lock. Each individual derived iterator is intended to be consumed by one thread at a time. If a single derived iterator must itself be shared by multiple threads, wrap it w...
Internally, values are buffered until every derived iterator has consumed them. The returned iterators share the same underlying synchronization lock. Each individual derived iterator is intended to be consumed by one thread at a time. If a single derived iterator must itself be shared by multiple threads, wrap it w...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cfab1fd1-e507-4132-97d4-5e3ef04a56ff
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,575
supabase-export-v2
56b71934056ce87f
the range 0 to *parties* -- 1, different for each thread. This can be used to select a thread to do some special housekeeping, e.g.:: i = barrier.wait() if i == 0: # Only one thread needs to print this print("passed the barrier")
trusted_official_docs
CPython Docs
the range 0 to *parties* -- 1, different for each thread. This can be used to select a thread to do some special housekeeping, e.g.:: i = barrier.wait() if i == 0: # Only one thread needs to print this print("passed the barrier")
the range 0 to *parties* -- 1, different for each thread. This can be used to select a thread to do some special housekeeping, e.g.:: i = barrier.wait() if i == 0: # Only one thread needs to print this print("passed the barrier")
python, official-docs, cpython, P0
Local_Trusted_Corpus
d125d9bb-77aa-4d02-b449-af80029e6c9a
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,539
supabase-export-v2
9c0d5f8a5c91c08c
the :meth:`~Event.set` method and reset to false with the :meth:`clear` method. The :meth:`wait` method blocks until the flag is true. The flag is initially false. .. versionchanged:: 3.3 changed from a factory function to a class.
trusted_official_docs
CPython Docs
the :meth:`~Event.set` method and reset to false with the :meth:`clear` method. The :meth:`wait` method blocks until the flag is true. The flag is initially false. .. versionchanged:: 3.3 changed from a factory function to a class.
the :meth:`~Event.set` method and reset to false with the :meth:`clear` method. The :meth:`wait` method blocks until the flag is true. The flag is initially false. .. versionchanged:: 3.3 changed from a factory function to a class.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d15763e5-d1a8-469d-b874-337f8cd518ea
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,461
supabase-export-v2
38aae470174339d4
Condition objects ^^^^^^^^^^^^^^^^^ A condition variable is always associated with some kind of lock; this can be passed in or one will be created by default. Passing one in is useful when several condition variables must share the same lock. The lock is part of the condition object: you don't have to track it separate...
trusted_official_docs
CPython Docs
Condition objects ^^^^^^^^^^^^^^^^^ A condition variable is always associated with some kind of lock; this can be passed in or one will be created by default. Passing one in is useful when several condition variables must share the same lock. The lock is part of the condition object: you don't have to track it separate...
Condition objects ^^^^^^^^^^^^^^^^^ A condition variable is always associated with some kind of lock; this can be passed in or one will be created by default. Passing one in is useful when several condition variables must share the same lock. The lock is part of the condition object: you don't have to track it separate...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d1fbac4b-484d-489b-8d76-5fb88b6d482a
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,432
supabase-export-v2
a15d00f8ffa3ea4d
.. note:: Reentrant locks support the :ref:`context management protocol <with-locks>`, so it is recommended to use :keyword:`with` instead of manually calling :meth:`~RLock.acquire` and :meth:`~RLock.release` to handle acquiring and releasing the lock for a block of code.
trusted_official_docs
CPython Docs
.. note:: Reentrant locks support the :ref:`context management protocol <with-locks>`, so it is recommended to use :keyword:`with` instead of manually calling :meth:`~RLock.acquire` and :meth:`~RLock.release` to handle acquiring and releasing the lock for a block of code.
.. note:: Reentrant locks support the :ref:`context management protocol <with-locks>`, so it is recommended to use :keyword:`with` instead of manually calling :meth:`~RLock.acquire` and :meth:`~RLock.release` to handle acquiring and releasing the lock for a block of code.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d2144e1c-66bd-44c6-9140-c12571ddcfcd
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,491
supabase-export-v2
adc1a04877e461db
.. method:: wait_for(predicate, timeout=None) Wait until a condition evaluates to true. *predicate* should be a callable which result will be interpreted as a boolean value. A *timeout* may be provided giving the maximum time to wait.
trusted_official_docs
CPython Docs
.. method:: wait_for(predicate, timeout=None) Wait until a condition evaluates to true. *predicate* should be a callable which result will be interpreted as a boolean value. A *timeout* may be provided giving the maximum time to wait.
.. method:: wait_for(predicate, timeout=None) Wait until a condition evaluates to true. *predicate* should be a callable which result will be interpreted as a boolean value. A *timeout* may be provided giving the maximum time to wait.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d3fece7c-2352-477e-9efc-02f267a630f8
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,304
supabase-export-v2
29ade1d41378180f
groups, and threads cannot be destroyed, stopped, suspended, resumed, or interrupted. The static methods of Java's Thread class, when implemented, are mapped to module-level functions. All of the methods described below are executed atomically.
trusted_official_docs
CPython Docs
groups, and threads cannot be destroyed, stopped, suspended, resumed, or interrupted. The static methods of Java's Thread class, when implemented, are mapped to module-level functions. All of the methods described below are executed atomically.
groups, and threads cannot be destroyed, stopped, suspended, resumed, or interrupted. The static methods of Java's Thread class, when implemented, are mapped to module-level functions. All of the methods described below are executed atomically.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d7274a99-99ea-4f5e-98ac-0a4f948fe58f
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,523
supabase-export-v2
f338e43927e663b4
When it was zero on entry and other threads are waiting for it to become larger than zero again, wake up *n* of those threads. .. versionchanged:: 3.9 Added the *n* parameter to release multiple waiting threads at once.
trusted_official_docs
CPython Docs
When it was zero on entry and other threads are waiting for it to become larger than zero again, wake up *n* of those threads. .. versionchanged:: 3.9 Added the *n* parameter to release multiple waiting threads at once.
When it was zero on entry and other threads are waiting for it to become larger than zero again, wake up *n* of those threads. .. versionchanged:: 3.9 Added the *n* parameter to release multiple waiting threads at once.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d75911c0-e029-4c96-b806-e9bb7fc83d86
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,315
supabase-export-v2
a582a58046e106aa
>>> mydata.number 42 Of course, values you get from a :class:`local` object, including their :attr:`~object.__dict__` attribute, are for whatever thread was current at the time the attribute was read. For that reason, you generally don't want to save these values across threads, as they apply only to the thread they ca...
trusted_official_docs
CPython Docs
>>> mydata.number 42 Of course, values you get from a :class:`local` object, including their :attr:`~object.__dict__` attribute, are for whatever thread was current at the time the attribute was read. For that reason, you generally don't want to save these values across threads, as they apply only to the thread they ca...
>>> mydata.number 42 Of course, values you get from a :class:`local` object, including their :attr:`~object.__dict__` attribute, are for whatever thread was current at the time the attribute was read. For that reason, you generally don't want to save these values across threads, as they apply only to the thread they ca...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d95b5ce8-49d9-4fee-b6dc-28350623048d
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,522
supabase-export-v2
f4407f503d9dd3b4
.. method:: release(n=1) Release a semaphore, incrementing the internal counter by *n*. When it was zero on entry and other threads are waiting for it to become larger than zero again, wake up *n* of those threads.
trusted_official_docs
CPython Docs
.. method:: release(n=1) Release a semaphore, incrementing the internal counter by *n*. When it was zero on entry and other threads are waiting for it to become larger than zero again, wake up *n* of those threads.
.. method:: release(n=1) Release a semaphore, incrementing the internal counter by *n*. When it was zero on entry and other threads are waiting for it to become larger than zero again, wake up *n* of those threads.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d9eb28f4-fef2-414c-b53b-1dd4a48e8dd3
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,463
supabase-export-v2
983b2096f72a3eb4
acquires the associated lock for the duration of the enclosed block. The :meth:`~Condition.acquire` and :meth:`~Condition.release` methods also call the corresponding methods of the associated lock. Other methods must be called with the associated lock held. The :meth:`~Condition.wait` method releases the lock, and the...
trusted_official_docs
CPython Docs
acquires the associated lock for the duration of the enclosed block. The :meth:`~Condition.acquire` and :meth:`~Condition.release` methods also call the corresponding methods of the associated lock. Other methods must be called with the associated lock held. The :meth:`~Condition.wait` method releases the lock, and the...
acquires the associated lock for the duration of the enclosed block. The :meth:`~Condition.acquire` and :meth:`~Condition.release` methods also call the corresponding methods of the associated lock. Other methods must be called with the associated lock held. The :meth:`~Condition.wait` method releases the lock, and the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
dbf7efde-040b-4e8a-acd9-c154340b738c
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,397
supabase-export-v2
e5fbee083306d9d4
Return whether the thread is alive. This method returns ``True`` just before the :meth:`~Thread.run` method starts until just after the :meth:`~Thread.run` method terminates. The module function :func:`.enumerate` returns a list of all alive threads.
trusted_official_docs
CPython Docs
Return whether the thread is alive. This method returns ``True`` just before the :meth:`~Thread.run` method starts until just after the :meth:`~Thread.run` method terminates. The module function :func:`.enumerate` returns a list of all alive threads.
Return whether the thread is alive. This method returns ``True`` just before the :meth:`~Thread.run` method starts until just after the :meth:`~Thread.run` method terminates. The module function :func:`.enumerate` returns a list of all alive threads.
python, official-docs, cpython, P0
Local_Trusted_Corpus
dc6103c6-3731-450f-a830-896be9c5a800
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,340
supabase-export-v2
00cc462acd634ecf
being alive when its :meth:`~Thread.run` method terminates -- either normally, or by raising an unhandled exception. The :meth:`~Thread.is_alive` method tests whether the thread is alive. Other threads can call a thread's :meth:`~Thread.join` method. This blocks the calling thread until the thread whose :meth:`~Thread....
trusted_official_docs
CPython Docs
being alive when its :meth:`~Thread.run` method terminates -- either normally, or by raising an unhandled exception. The :meth:`~Thread.is_alive` method tests whether the thread is alive. Other threads can call a thread's :meth:`~Thread.join` method. This blocks the calling thread until the thread whose :meth:`~Thread....
being alive when its :meth:`~Thread.run` method terminates -- either normally, or by raising an unhandled exception. The :meth:`~Thread.is_alive` method tests whether the thread is alive. Other threads can call a thread's :meth:`~Thread.join` method. This blocks the calling thread until the thread whose :meth:`~Thread....
python, official-docs, cpython, P0
Local_Trusted_Corpus
dd2792f6-6ff4-42a2-81ae-c57b3929c5f8
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,404
supabase-export-v2
860deb27b54bd962
Lock objects ^^^^^^^^^^^^ A primitive lock is a synchronization primitive that is not owned by a particular thread when locked. In Python, it is currently the lowest level synchronization primitive available, implemented directly by the :mod:`_thread` extension module.
trusted_official_docs
CPython Docs
Lock objects ^^^^^^^^^^^^ A primitive lock is a synchronization primitive that is not owned by a particular thread when locked. In Python, it is currently the lowest level synchronization primitive available, implemented directly by the :mod:`_thread` extension module.
Lock objects ^^^^^^^^^^^^ A primitive lock is a synchronization primitive that is not owned by a particular thread when locked. In Python, it is currently the lowest level synchronization primitive available, implemented directly by the :mod:`_thread` extension module.
python, official-docs, cpython, P0
Local_Trusted_Corpus
de662c02-2cf8-4bd0-bcd7-8745f2ec8d5b
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,500
supabase-export-v2
b84556707cd02924
*n* threads are waiting. However, it's not safe to rely on this behavior. A future, optimized implementation may occasionally wake up more than *n* threads. Note: an awakened thread does not actually return from its :meth:`wait` call until it can reacquire the lock. Since :meth:`notify` does not release the lock, its...
trusted_official_docs
CPython Docs
*n* threads are waiting. However, it's not safe to rely on this behavior. A future, optimized implementation may occasionally wake up more than *n* threads. Note: an awakened thread does not actually return from its :meth:`wait` call until it can reacquire the lock. Since :meth:`notify` does not release the lock, its...
*n* threads are waiting. However, it's not safe to rely on this behavior. A future, optimized implementation may occasionally wake up more than *n* threads. Note: an awakened thread does not actually return from its :meth:`wait` call until it can reacquire the lock. Since :meth:`notify` does not release the lock, its...
python, official-docs, cpython, P0
Local_Trusted_Corpus
dfcaecf8-4b97-47a2-af13-d46e361ac4e5
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,536
supabase-export-v2
babbe6b220214a0c
This is one of the simplest mechanisms for communication between threads: one thread signals an event and other threads wait for it. An event object manages an internal flag that can be set to true with the :meth:`~Event.set` method and reset to false with the :meth:`~Event.clear` method. The :meth:`~Event.wait` method...
trusted_official_docs
CPython Docs
This is one of the simplest mechanisms for communication between threads: one thread signals an event and other threads wait for it. An event object manages an internal flag that can be set to true with the :meth:`~Event.set` method and reset to false with the :meth:`~Event.clear` method. The :meth:`~Event.wait` method...
This is one of the simplest mechanisms for communication between threads: one thread signals an event and other threads wait for it. An event object manages an internal flag that can be set to true with the :meth:`~Event.set` method and reset to false with the :meth:`~Event.clear` method. The :meth:`~Event.wait` method...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e0149965-e2dc-424b-92f0-d5bcfc763793
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,485
supabase-export-v2
c37e3be342e2f910
until notified or until a timeout occurs. If the calling thread has not acquired the lock when this method is called, a :exc:`RuntimeError` is raised. This method releases the underlying lock, and then blocks until it is awakened by a :meth:`notify` or :meth:`notify_all` call for the same condition variable in anothe...
trusted_official_docs
CPython Docs
until notified or until a timeout occurs. If the calling thread has not acquired the lock when this method is called, a :exc:`RuntimeError` is raised. This method releases the underlying lock, and then blocks until it is awakened by a :meth:`notify` or :meth:`notify_all` call for the same condition variable in anothe...
until notified or until a timeout occurs. If the calling thread has not acquired the lock when this method is called, a :exc:`RuntimeError` is raised. This method releases the underlying lock, and then blocks until it is awakened by a :meth:`notify` or :meth:`notify_all` call for the same condition variable in anothe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e1cadfdc-92fe-4263-8160-b796487881ae
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,518
supabase-export-v2
acb5f3ccd936c85f
block. If a call without an argument would block, return ``False`` immediately; otherwise, do the same thing as when called without arguments, and return ``True``. When invoked with a *timeout* other than ``None``, it will block for at most *timeout* seconds. If acquire does not complete successfully in that interval...
trusted_official_docs
CPython Docs
block. If a call without an argument would block, return ``False`` immediately; otherwise, do the same thing as when called without arguments, and return ``True``. When invoked with a *timeout* other than ``None``, it will block for at most *timeout* seconds. If acquire does not complete successfully in that interval...
block. If a call without an argument would block, return ``False`` immediately; otherwise, do the same thing as when called without arguments, and return ``True``. When invoked with a *timeout* other than ``None``, it will block for at most *timeout* seconds. If acquire does not complete successfully in that interval...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e2164694-f42d-4c82-99b5-9950ab91c51d
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,425
supabase-export-v2
fab7b2748d3a27ae
it to unlocked, and return. If any other threads are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed. When invoked on an unlocked lock, a :exc:`RuntimeError` is raised.
trusted_official_docs
CPython Docs
it to unlocked, and return. If any other threads are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed. When invoked on an unlocked lock, a :exc:`RuntimeError` is raised.
it to unlocked, and return. If any other threads are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed. When invoked on an unlocked lock, a :exc:`RuntimeError` is raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e2797683-b375-4cec-b24b-b970a9c64fd2
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,493
supabase-export-v2
069aaa8edeb287f2
until a timeout occurs. The return value is the last return value of the predicate and will evaluate to ``False`` if the method timed out. Ignoring the timeout feature, calling this method is roughly equivalent to writing::
trusted_official_docs
CPython Docs
until a timeout occurs. The return value is the last return value of the predicate and will evaluate to ``False`` if the method timed out. Ignoring the timeout feature, calling this method is roughly equivalent to writing::
until a timeout occurs. The return value is the last return value of the predicate and will evaluate to ``False`` if the method timed out. Ignoring the timeout feature, calling this method is roughly equivalent to writing::
python, official-docs, cpython, P0
Local_Trusted_Corpus
e2a93965-6c80-4e33-b623-893a85ff1ae1
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,355
supabase-export-v2
bb466645936fe785
If not ``None``, *daemon* explicitly sets whether the thread is daemonic. If ``None`` (the default), the daemonic property is inherited from the current thread. *context* is the :class:`~contextvars.Context` value to use when starting the thread. The default value is ``None`` which indicates that the :data:`sys.flags...
trusted_official_docs
CPython Docs
If not ``None``, *daemon* explicitly sets whether the thread is daemonic. If ``None`` (the default), the daemonic property is inherited from the current thread. *context* is the :class:`~contextvars.Context` value to use when starting the thread. The default value is ``None`` which indicates that the :data:`sys.flags...
If not ``None``, *daemon* explicitly sets whether the thread is daemonic. If ``None`` (the default), the daemonic property is inherited from the current thread. *context* is the :class:`~contextvars.Context` value to use when starting the thread. The default value is ``None`` which indicates that the :data:`sys.flags...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e49f129b-bcf0-4d96-b250-c17d789a41f4
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,339
supabase-export-v2
c8d4d4c423fc4f3b
object is created, its activity must be started by calling the thread's :meth:`~Thread.start` method. This invokes the :meth:`~Thread.run` method in a separate thread of control. Once the thread's activity is started, the thread is considered 'alive'. It stops being alive when its :meth:`~Thread.run` method terminates ...
trusted_official_docs
CPython Docs
object is created, its activity must be started by calling the thread's :meth:`~Thread.start` method. This invokes the :meth:`~Thread.run` method in a separate thread of control. Once the thread's activity is started, the thread is considered 'alive'. It stops being alive when its :meth:`~Thread.run` method terminates ...
object is created, its activity must be started by calling the thread's :meth:`~Thread.start` method. This invokes the :meth:`~Thread.run` method in a separate thread of control. Once the thread's activity is started, the thread is considered 'alive'. It stops being alive when its :meth:`~Thread.run` method terminates ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e4dd1f23-55b5-46a0-85b5-385af7e16ad9
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,391
supabase-export-v2
8f29836d5361f6bb
.. attribute:: native_id The Thread ID (``TID``) of this thread, as assigned by the OS (kernel). This is a non-negative integer, or ``None`` if the thread has not been started. See the :func:`get_native_id` function. This value may be used to uniquely identify this particular thread system-wide (until the thread term...
trusted_official_docs
CPython Docs
.. attribute:: native_id The Thread ID (``TID``) of this thread, as assigned by the OS (kernel). This is a non-negative integer, or ``None`` if the thread has not been started. See the :func:`get_native_id` function. This value may be used to uniquely identify this particular thread system-wide (until the thread term...
.. attribute:: native_id The Thread ID (``TID``) of this thread, as assigned by the OS (kernel). This is a non-negative integer, or ``None`` if the thread has not been started. See the :func:`get_native_id` function. This value may be used to uniquely identify this particular thread system-wide (until the thread term...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e661b05d-d4e3-44ef-8c80-01b44b32b8a5
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,578
supabase-export-v2
d7166070b6e153fa
If the call times out, the barrier is put into the broken state. This method may raise a :class:`BrokenBarrierError` exception if the barrier is broken or reset while a thread is waiting.
trusted_official_docs
CPython Docs
If the call times out, the barrier is put into the broken state. This method may raise a :class:`BrokenBarrierError` exception if the barrier is broken or reset while a thread is waiting.
If the call times out, the barrier is put into the broken state. This method may raise a :class:`BrokenBarrierError` exception if the barrier is broken or reset while a thread is waiting.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e899a9cb-2652-4499-a70e-a4d5a9f66d46
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,264
supabase-export-v2
11616729fec4274b
value may be used to uniquely identify this particular thread system-wide (until the thread terminates, after which the value may be recycled by the OS). .. availability:: Windows, FreeBSD, Linux, macOS, OpenBSD, NetBSD, AIX, DragonFlyBSD, GNU/kFreeBSD, Solaris.
trusted_official_docs
CPython Docs
value may be used to uniquely identify this particular thread system-wide (until the thread terminates, after which the value may be recycled by the OS). .. availability:: Windows, FreeBSD, Linux, macOS, OpenBSD, NetBSD, AIX, DragonFlyBSD, GNU/kFreeBSD, Solaris.
value may be used to uniquely identify this particular thread system-wide (until the thread terminates, after which the value may be recycled by the OS). .. availability:: Windows, FreeBSD, Linux, macOS, OpenBSD, NetBSD, AIX, DragonFlyBSD, GNU/kFreeBSD, Solaris.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e90e4742-2005-4a84-b529-bddfa8a601a7
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,499
supabase-export-v2
0402f7d10a242381
This method wakes up at most *n* of the threads waiting for the condition variable; it is a no-op if no threads are waiting. The current implementation wakes up exactly *n* threads, if at least *n* threads are waiting. However, it's not safe to rely on this behavior. A future, optimized implementation may occasionally...
trusted_official_docs
CPython Docs
This method wakes up at most *n* of the threads waiting for the condition variable; it is a no-op if no threads are waiting. The current implementation wakes up exactly *n* threads, if at least *n* threads are waiting. However, it's not safe to rely on this behavior. A future, optimized implementation may occasionally...
This method wakes up at most *n* of the threads waiting for the condition variable; it is a no-op if no threads are waiting. The current implementation wakes up exactly *n* threads, if at least *n* threads are waiting. However, it's not safe to rely on this behavior. A future, optimized implementation may occasionally...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ebbd62fa-9960-4246-9ee4-39f53b0dd63c
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,352
supabase-export-v2
da0391cfdedb6d43
constructed of the form "Thread-*N*" where *N* is a small decimal number, or "Thread-*N* (target)" where "target" is ``target.__name__`` if the *target* argument is specified. *args* is a list or tuple of arguments for the target invocation. Defaults to ``()``.
trusted_official_docs
CPython Docs
constructed of the form "Thread-*N*" where *N* is a small decimal number, or "Thread-*N* (target)" where "target" is ``target.__name__`` if the *target* argument is specified. *args* is a list or tuple of arguments for the target invocation. Defaults to ``()``.
constructed of the form "Thread-*N*" where *N* is a small decimal number, or "Thread-*N* (target)" where "target" is ``target.__name__`` if the *target* argument is specified. *args* is a list or tuple of arguments for the target invocation. Defaults to ``()``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ed2a0839-2ffd-41b1-bd85-335353ccc706
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,445
supabase-export-v2
5e37f754a181867b
* If another thread owns the lock, block until we are able to acquire lock, or *timeout*, if set to a positive value. * If the same thread owns the lock, acquire the lock again, and return immediately. This is the difference between :class:`Lock` and :class:`!RLock`; :class:`Lock` handles this case the same as the pr...
trusted_official_docs
CPython Docs
* If another thread owns the lock, block until we are able to acquire lock, or *timeout*, if set to a positive value. * If the same thread owns the lock, acquire the lock again, and return immediately. This is the difference between :class:`Lock` and :class:`!RLock`; :class:`Lock` handles this case the same as the pr...
* If another thread owns the lock, block until we are able to acquire lock, or *timeout*, if set to a positive value. * If the same thread owns the lock, acquire the lock again, and return immediately. This is the difference between :class:`Lock` and :class:`!RLock`; :class:`Lock` handles this case the same as the pr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
eecf8235-0493-4a90-b112-349137376b65
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,344
supabase-export-v2
7362f083f67546c1
are left. The initial value is inherited from the creating thread. The flag can be set through the :attr:`~Thread.daemon` property or the *daemon* constructor argument. .. note:: Daemon threads are abruptly stopped at shutdown. Their resources (such as open files, database transactions, etc.) may not be released prop...
trusted_official_docs
CPython Docs
are left. The initial value is inherited from the creating thread. The flag can be set through the :attr:`~Thread.daemon` property or the *daemon* constructor argument. .. note:: Daemon threads are abruptly stopped at shutdown. Their resources (such as open files, database transactions, etc.) may not be released prop...
are left. The initial value is inherited from the creating thread. The flag can be set through the :attr:`~Thread.daemon` property or the *daemon* constructor argument. .. note:: Daemon threads are abruptly stopped at shutdown. Their resources (such as open files, database transactions, etc.) may not be released prop...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f054f4c3-f85b-45ce-b222-1a560248a1d2
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,486
supabase-export-v2
1f9a82890b534401
for the same condition variable in another thread, or until the optional timeout occurs. Once awakened or timed out, it re-acquires the lock and returns. When the *timeout* argument is present and not ``None``, it should be a real number specifying a timeout for the operation in seconds (or fractions thereof).
trusted_official_docs
CPython Docs
for the same condition variable in another thread, or until the optional timeout occurs. Once awakened or timed out, it re-acquires the lock and returns. When the *timeout* argument is present and not ``None``, it should be a real number specifying a timeout for the operation in seconds (or fractions thereof).
for the same condition variable in another thread, or until the optional timeout occurs. Once awakened or timed out, it re-acquires the lock and returns. When the *timeout* argument is present and not ``None``, it should be a real number specifying a timeout for the operation in seconds (or fractions thereof).
python, official-docs, cpython, P0
Local_Trusted_Corpus
f0703f92-45ad-4b4d-b587-1a5c9dc506f4
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,414
supabase-export-v2
3cbac4e032e4b597
Acquire a lock, blocking or non-blocking. When invoked with the *blocking* argument set to ``True`` (the default), block until the lock is unlocked, then set it to locked and return ``True``.
trusted_official_docs
CPython Docs
Acquire a lock, blocking or non-blocking. When invoked with the *blocking* argument set to ``True`` (the default), block until the lock is unlocked, then set it to locked and return ``True``.
Acquire a lock, blocking or non-blocking. When invoked with the *blocking* argument set to ``True`` (the default), block until the lock is unlocked, then set it to locked and return ``True``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f46838c9-2169-4644-9020-ba441c904495
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,517
supabase-export-v2
f7e6357c501b9a20
return ``True``. Exactly one thread will be awoken by each call to :meth:`~Semaphore.release`. The order in which threads are awoken should not be relied on. When invoked with *blocking* set to ``False``, do not block. If a call without an argument would block, return ``False`` immediately; otherwise, do the same thi...
trusted_official_docs
CPython Docs
return ``True``. Exactly one thread will be awoken by each call to :meth:`~Semaphore.release`. The order in which threads are awoken should not be relied on. When invoked with *blocking* set to ``False``, do not block. If a call without an argument would block, return ``False`` immediately; otherwise, do the same thi...
return ``True``. Exactly one thread will be awoken by each call to :meth:`~Semaphore.release`. The order in which threads are awoken should not be relied on. When invoked with *blocking* set to ``False``, do not block. If a call without an argument would block, return ``False`` immediately; otherwise, do the same thi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f4f818c0-0501-478e-b785-ad37ed09e205
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,433
supabase-export-v2
954e8158e161dd6a
it is recommended to use :keyword:`with` instead of manually calling :meth:`~RLock.acquire` and :meth:`~RLock.release` to handle acquiring and releasing the lock for a block of code. RLock's :meth:`~RLock.acquire`/:meth:`~RLock.release` call pairs may be nested, unlike Lock's :meth:`~Lock.acquire`/:meth:`~Lock.release`...
trusted_official_docs
CPython Docs
it is recommended to use :keyword:`with` instead of manually calling :meth:`~RLock.acquire` and :meth:`~RLock.release` to handle acquiring and releasing the lock for a block of code. RLock's :meth:`~RLock.acquire`/:meth:`~RLock.release` call pairs may be nested, unlike Lock's :meth:`~Lock.acquire`/:meth:`~Lock.release`...
it is recommended to use :keyword:`with` instead of manually calling :meth:`~RLock.acquire` and :meth:`~RLock.release` to handle acquiring and releasing the lock for a block of code. RLock's :meth:`~RLock.acquire`/:meth:`~RLock.release` call pairs may be nested, unlike Lock's :meth:`~Lock.acquire`/:meth:`~Lock.release`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f5355ca6-b17d-43cc-a681-742c2fd2f4e0
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,511
supabase-export-v2
21061593b28bd576
an initial value. The :meth:`acquire` method blocks if necessary until it can return without making the counter negative. If not given, *value* defaults to 1. The optional argument gives the initial *value* for the internal counter; it defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is raise...
trusted_official_docs
CPython Docs
an initial value. The :meth:`acquire` method blocks if necessary until it can return without making the counter negative. If not given, *value* defaults to 1. The optional argument gives the initial *value* for the internal counter; it defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is raise...
an initial value. The :meth:`acquire` method blocks if necessary until it can return without making the counter negative. If not given, *value* defaults to 1. The optional argument gives the initial *value* for the internal counter; it defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is raise...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f639e2f6-9716-4d17-926b-8ceb70a9e464
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,574
supabase-export-v2
58c3e631975f1a6c
function, they are all released simultaneously. If a *timeout* is provided, it is used in preference to any that was supplied to the class constructor. The return value is an integer in the range 0 to *parties* -- 1, different for each thread. This can be used to select a thread to do some special housekeeping, e.g.:...
trusted_official_docs
CPython Docs
function, they are all released simultaneously. If a *timeout* is provided, it is used in preference to any that was supplied to the class constructor. The return value is an integer in the range 0 to *parties* -- 1, different for each thread. This can be used to select a thread to do some special housekeeping, e.g.:...
function, they are all released simultaneously. If a *timeout* is provided, it is used in preference to any that was supplied to the class constructor. The return value is an integer in the range 0 to *parties* -- 1, different for each thread. This can be used to select a thread to do some special housekeeping, e.g.:...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f669fa3e-3cdf-4ae4-bdef-aa272f0831a8
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,525
supabase-export-v2
2c9c7b754974bc07
.. class:: BoundedSemaphore(value=1) Class implementing bounded semaphore objects. A bounded semaphore checks to make sure its current value doesn't exceed its initial value. If it does, :exc:`ValueError` is raised. In most situations semaphores are used to guard resources with limited capacity. If the semaphore is ...
trusted_official_docs
CPython Docs
.. class:: BoundedSemaphore(value=1) Class implementing bounded semaphore objects. A bounded semaphore checks to make sure its current value doesn't exceed its initial value. If it does, :exc:`ValueError` is raised. In most situations semaphores are used to guard resources with limited capacity. If the semaphore is ...
.. class:: BoundedSemaphore(value=1) Class implementing bounded semaphore objects. A bounded semaphore checks to make sure its current value doesn't exceed its initial value. If it does, :exc:`ValueError` is raised. In most situations semaphores are used to guard resources with limited capacity. If the semaphore is ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f99c7699-de78-4cf5-bd18-6e284180ebc1
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,345
supabase-export-v2
83cc3c8938837189
not be released properly. If you want your threads to stop gracefully, make them non-daemonic and use a suitable signalling mechanism such as an :class:`Event`. There is a "main thread" object; this corresponds to the initial thread of control in the Python program. It is not a daemon thread.
trusted_official_docs
CPython Docs
not be released properly. If you want your threads to stop gracefully, make them non-daemonic and use a suitable signalling mechanism such as an :class:`Event`. There is a "main thread" object; this corresponds to the initial thread of control in the Python program. It is not a daemon thread.
not be released properly. If you want your threads to stop gracefully, make them non-daemonic and use a suitable signalling mechanism such as an :class:`Event`. There is a "main thread" object; this corresponds to the initial thread of control in the Python program. It is not a daemon thread.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fca7521f-be7b-4280-8892-8a6de99136b8
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,228
supabase-export-v2
05a0684705276c42
.. seealso:: :class:`concurrent.futures.ThreadPoolExecutor` offers a higher level interface to push tasks to a background thread without blocking execution of the calling thread, while still being able to retrieve their results when needed.
trusted_official_docs
CPython Docs
.. seealso:: :class:`concurrent.futures.ThreadPoolExecutor` offers a higher level interface to push tasks to a background thread without blocking execution of the calling thread, while still being able to retrieve their results when needed.
.. seealso:: :class:`concurrent.futures.ThreadPoolExecutor` offers a higher level interface to push tasks to a background thread without blocking execution of the calling thread, while still being able to retrieve their results when needed.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fd4874e7-9582-4885-829e-41ae1df20871
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,307
supabase-export-v2
4e1bee1aecb24118
values are thread specific. If you have data that you want to be local to a thread, create a :class:`local` object and use its attributes:: >>> mydata = local() >>> mydata.number = 42 >>> mydata.number 42
trusted_official_docs
CPython Docs
values are thread specific. If you have data that you want to be local to a thread, create a :class:`local` object and use its attributes:: >>> mydata = local() >>> mydata.number = 42 >>> mydata.number 42
values are thread specific. If you have data that you want to be local to a thread, create a :class:`local` object and use its attributes:: >>> mydata = local() >>> mydata.number = 42 >>> mydata.number 42
python, official-docs, cpython, P0
Local_Trusted_Corpus
fe82f5a0-f930-45c7-bf50-3d4cab268692
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,351
supabase-export-v2
847a9becffa3fce9
*target* is the callable object to be invoked by the :meth:`run` method. Defaults to ``None``, meaning nothing is called. *name* is the thread name. By default, a unique name is constructed of the form "Thread-*N*" where *N* is a small decimal number, or "Thread-*N* (target)" where "target" is ``target.__name__`` if ...
trusted_official_docs
CPython Docs
*target* is the callable object to be invoked by the :meth:`run` method. Defaults to ``None``, meaning nothing is called. *name* is the thread name. By default, a unique name is constructed of the form "Thread-*N*" where *N* is a small decimal number, or "Thread-*N* (target)" where "target" is ``target.__name__`` if ...
*target* is the callable object to be invoked by the :meth:`run` method. Defaults to ``None``, meaning nothing is called. *name* is the thread name. By default, a unique name is constructed of the form "Thread-*N*" where *N* is a small decimal number, or "Thread-*N* (target)" where "target" is ``target.__name__`` if ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fed19464-c526-4754-8e4b-5b1b723c3bef
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,466
supabase-export-v2
851ee6760b57d137
awakened will not return from their :meth:`~Condition.wait` call immediately, but only when the thread that called :meth:`~Condition.notify` or :meth:`~Condition.notify_all` finally relinquishes ownership of the lock. The typical programming style using condition variables uses the lock to synchronize access to some sh...
trusted_official_docs
CPython Docs
awakened will not return from their :meth:`~Condition.wait` call immediately, but only when the thread that called :meth:`~Condition.notify` or :meth:`~Condition.notify_all` finally relinquishes ownership of the lock. The typical programming style using condition variables uses the lock to synchronize access to some sh...
awakened will not return from their :meth:`~Condition.wait` call immediately, but only when the thread that called :meth:`~Condition.notify` or :meth:`~Condition.notify_all` finally relinquishes ownership of the lock. The typical programming style using condition variables uses the lock to synchronize access to some sh...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ff1923f2-2b07-413f-b229-4c312e9e0bd5
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,529
supabase-export-v2
13632c2add8558a4
:class:`Semaphore` example ^^^^^^^^^^^^^^^^^^^^^^^^^^ Semaphores are often used to guard resources with limited capacity, for example, a database server. In any situation where the size of the resource is fixed, you should use a bounded semaphore. Before spawning any worker threads, your main thread would initialize th...
trusted_official_docs
CPython Docs
:class:`Semaphore` example ^^^^^^^^^^^^^^^^^^^^^^^^^^ Semaphores are often used to guard resources with limited capacity, for example, a database server. In any situation where the size of the resource is fixed, you should use a bounded semaphore. Before spawning any worker threads, your main thread would initialize th...
:class:`Semaphore` example ^^^^^^^^^^^^^^^^^^^^^^^^^^ Semaphores are often used to guard resources with limited capacity, for example, a database server. In any situation where the size of the resource is fixed, you should use a bounded semaphore. Before spawning any worker threads, your main thread would initialize th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ff83dc7e-ba7b-4264-a27a-5b8993e6f8c3
CPython Docs
file://datasets/cpython/Doc/library/threading.rst
unknown
803f0533-1359-49ee-b5f5-632bde546d27
15,385
supabase-export-v2
417d2b12984faa2a
in task managers. This name may be truncated to fit in a system-specific limit (for example, 15 bytes on Linux or 63 bytes on macOS). Changes to *name* are only reflected at the OS level when the currently running thread is renamed. (Setting the *name* attribute of a different thread only updates the Python Thread ob...
trusted_official_docs
CPython Docs
in task managers. This name may be truncated to fit in a system-specific limit (for example, 15 bytes on Linux or 63 bytes on macOS). Changes to *name* are only reflected at the OS level when the currently running thread is renamed. (Setting the *name* attribute of a different thread only updates the Python Thread ob...
in task managers. This name may be truncated to fit in a system-specific limit (for example, 15 bytes on Linux or 63 bytes on macOS). Changes to *name* are only reflected at the OS level when the currently running thread is renamed. (Setting the *name* attribute of a different thread only updates the Python Thread ob...
python, official-docs, cpython, P0
Local_Trusted_Corpus
14a8a7ac-105e-4c2f-91a3-6d5aa3d116f9
CPython Docs
file://datasets/cpython/Doc/library/tkinter.scrolledtext.rst
unknown
5737b335-fbbe-446e-9f39-dd33c2798614
15,643
supabase-export-v2
8154587ebcf7331c
-------------- The :mod:`!tkinter.scrolledtext` module provides a class of the same name which implements a basic text widget which has a vertical scroll bar configured to do the "right thing." Using the :class:`ScrolledText` class is a lot easier than setting up a text widget and scroll bar directly.
trusted_official_docs
CPython Docs
-------------- The :mod:`!tkinter.scrolledtext` module provides a class of the same name which implements a basic text widget which has a vertical scroll bar configured to do the "right thing." Using the :class:`ScrolledText` class is a lot easier than setting up a text widget and scroll bar directly.
-------------- The :mod:`!tkinter.scrolledtext` module provides a class of the same name which implements a basic text widget which has a vertical scroll bar configured to do the "right thing." Using the :class:`ScrolledText` class is a lot easier than setting up a text widget and scroll bar directly.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b43056e0-cd19-4f92-bb90-7321fd8d8abc
CPython Docs
file://datasets/cpython/Doc/library/tkinter.scrolledtext.rst
unknown
5737b335-fbbe-446e-9f39-dd33c2798614
15,644
supabase-export-v2
9793099b4b325220
bar configured to do the "right thing." Using the :class:`ScrolledText` class is a lot easier than setting up a text widget and scroll bar directly. The text widget and scrollbar are packed together in a :class:`Frame`, and the methods of the :class:`Grid` and :class:`Pack` geometry managers are acquired from the :clas...
trusted_official_docs
CPython Docs
bar configured to do the "right thing." Using the :class:`ScrolledText` class is a lot easier than setting up a text widget and scroll bar directly. The text widget and scrollbar are packed together in a :class:`Frame`, and the methods of the :class:`Grid` and :class:`Pack` geometry managers are acquired from the :clas...
bar configured to do the "right thing." Using the :class:`ScrolledText` class is a lot easier than setting up a text widget and scroll bar directly. The text widget and scrollbar are packed together in a :class:`Frame`, and the methods of the :class:`Grid` and :class:`Pack` geometry managers are acquired from the :clas...
python, official-docs, cpython, P0
Local_Trusted_Corpus
df3c1047-e661-4eae-a80d-c64e35429e7c
CPython Docs
file://datasets/cpython/Doc/library/tkinter.scrolledtext.rst
unknown
5737b335-fbbe-446e-9f39-dd33c2798614
15,645
supabase-export-v2
c8795b5bd6f7cf82
:class:`Pack` geometry managers are acquired from the :class:`Frame` object. This allows the :class:`ScrolledText` widget to be used directly to achieve most normal geometry management behavior. Should more specific control be necessary, the following attributes are available:
trusted_official_docs
CPython Docs
:class:`Pack` geometry managers are acquired from the :class:`Frame` object. This allows the :class:`ScrolledText` widget to be used directly to achieve most normal geometry management behavior. Should more specific control be necessary, the following attributes are available:
:class:`Pack` geometry managers are acquired from the :class:`Frame` object. This allows the :class:`ScrolledText` widget to be used directly to achieve most normal geometry management behavior. Should more specific control be necessary, the following attributes are available:
python, official-docs, cpython, P0
Local_Trusted_Corpus
017422b3-db19-415d-97b1-cdba4d6cd670
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,669
supabase-export-v2
c5a6f244fd717edc
mode, this function is equivalent to the :class:`ZstdFile` constructor: ``ZstdFile(file, mode, ...)``. In this case, the *encoding*, *errors*, and *newline* parameters must not be provided. In text mode, a :class:`ZstdFile` object is created, and wrapped in an :class:`io.TextIOWrapper` instance with the specified enco...
trusted_official_docs
CPython Docs
mode, this function is equivalent to the :class:`ZstdFile` constructor: ``ZstdFile(file, mode, ...)``. In this case, the *encoding*, *errors*, and *newline* parameters must not be provided. In text mode, a :class:`ZstdFile` object is created, and wrapped in an :class:`io.TextIOWrapper` instance with the specified enco...
mode, this function is equivalent to the :class:`ZstdFile` constructor: ``ZstdFile(file, mode, ...)``. In this case, the *encoding*, *errors*, and *newline* parameters must not be provided. In text mode, a :class:`ZstdFile` object is created, and wrapped in an :class:`io.TextIOWrapper` instance with the specified enco...
python, official-docs, cpython, P0
Local_Trusted_Corpus
049c6aa0-682c-4867-b4e5-8df9dd4897d7
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,823
supabase-export-v2
66bf53035b4391ef
Log size of each bucket in the long distance matcher hash table for collision resolution. Larger values improve collision resolution but decrease compression speed. A value of zero causes the value to be selected automatically.
trusted_official_docs
CPython Docs
Log size of each bucket in the long distance matcher hash table for collision resolution. Larger values improve collision resolution but decrease compression speed. A value of zero causes the value to be selected automatically.
Log size of each bucket in the long distance matcher hash table for collision resolution. Larger values improve collision resolution but decrease compression speed. A value of zero causes the value to be selected automatically.
python, official-docs, cpython, P0
Local_Trusted_Corpus
07dbe198-5574-4895-8dc7-97e34be36400
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,830
supabase-export-v2
06fecdf723a4f5c0
This flag only takes effect under the following scenarios: * Calling :func:`compress` for one-shot compression * Providing all of the data to be compressed in the frame in a single :meth:`ZstdCompressor.compress` call, with the :attr:`ZstdCompressor.FLUSH_FRAME` mode. * Calling :meth:`ZstdCompressor.set_pledged_inpu...
trusted_official_docs
CPython Docs
This flag only takes effect under the following scenarios: * Calling :func:`compress` for one-shot compression * Providing all of the data to be compressed in the frame in a single :meth:`ZstdCompressor.compress` call, with the :attr:`ZstdCompressor.FLUSH_FRAME` mode. * Calling :meth:`ZstdCompressor.set_pledged_inpu...
This flag only takes effect under the following scenarios: * Calling :func:`compress` for one-shot compression * Providing all of the data to be compressed in the frame in a single :meth:`ZstdCompressor.compress` call, with the :attr:`ZstdCompressor.FLUSH_FRAME` mode. * Calling :meth:`ZstdCompressor.set_pledged_inpu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
07ea3e67-ddae-47d1-a31c-ad3b0893647d
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,848
supabase-export-v2
f2b2d6cf6a782100
* 0 means dynamically set the overlap amount * 1 means no overlap * 9 means use a full window size from the previous job Each increment halves/doubles the overlap size. "8" means an overlap of ``window_size/2``, "7" means an overlap of ``window_size/4``, etc.
trusted_official_docs
CPython Docs
* 0 means dynamically set the overlap amount * 1 means no overlap * 9 means use a full window size from the previous job Each increment halves/doubles the overlap size. "8" means an overlap of ``window_size/2``, "7" means an overlap of ``window_size/4``, etc.
* 0 means dynamically set the overlap amount * 1 means no overlap * 9 means use a full window size from the previous job Each increment halves/doubles the overlap size. "8" means an overlap of ``window_size/2``, "7" means an overlap of ``window_size/4``, etc.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0ecae3e8-41b8-4058-82ba-682a2db125f5
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,805
supabase-export-v2
ef734e94518de187
The impact of this field depends on the selected :class:`Strategy`. For strategies :attr:`~Strategy.btopt`, :attr:`~Strategy.btultra` and :attr:`~Strategy.btultra2`, the value is the length of a match considered "good enough" to stop searching. Larger values make compression ratios better, but compresses slower.
trusted_official_docs
CPython Docs
The impact of this field depends on the selected :class:`Strategy`. For strategies :attr:`~Strategy.btopt`, :attr:`~Strategy.btultra` and :attr:`~Strategy.btultra2`, the value is the length of a match considered "good enough" to stop searching. Larger values make compression ratios better, but compresses slower.
The impact of this field depends on the selected :class:`Strategy`. For strategies :attr:`~Strategy.btopt`, :attr:`~Strategy.btultra` and :attr:`~Strategy.btultra2`, the value is the length of a match considered "good enough" to stop searching. Larger values make compression ratios better, but compresses slower.
python, official-docs, cpython, P0
Local_Trusted_Corpus
106cae28-c637-43ce-a09a-bef8b45438c7
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,757
supabase-export-v2
0f7cb5f41e70ce14
when loading a Zstandard dictionary. When making multiple calls to compression or decompression, passing a digested dictionary will reduce the overhead of loading the dictionary. .. list-table:: Difference for compression :widths: 10 14 10 :header-rows: 1
trusted_official_docs
CPython Docs
when loading a Zstandard dictionary. When making multiple calls to compression or decompression, passing a digested dictionary will reduce the overhead of loading the dictionary. .. list-table:: Difference for compression :widths: 10 14 10 :header-rows: 1
when loading a Zstandard dictionary. When making multiple calls to compression or decompression, passing a digested dictionary will reduce the overhead of loading the dictionary. .. list-table:: Difference for compression :widths: 10 14 10 :header-rows: 1
python, official-docs, cpython, P0
Local_Trusted_Corpus
111a6dd5-5945-4a29-a162-5c506d272753
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,677
supabase-export-v2
9b580eab2606e212
when writing compressed data. Only one of *level* or *options* may be passed. The *zstd_dict* argument is a :class:`ZstdDict` instance to be used during compression. :class:`!ZstdFile` supports all the members specified by :class:`io.BufferedIOBase`, except for :meth:`~io.BufferedIOBase.detach` and :meth:`~io.IOBase....
trusted_official_docs
CPython Docs
when writing compressed data. Only one of *level* or *options* may be passed. The *zstd_dict* argument is a :class:`ZstdDict` instance to be used during compression. :class:`!ZstdFile` supports all the members specified by :class:`io.BufferedIOBase`, except for :meth:`~io.BufferedIOBase.detach` and :meth:`~io.IOBase....
when writing compressed data. Only one of *level* or *options* may be passed. The *zstd_dict* argument is a :class:`ZstdDict` instance to be used during compression. :class:`!ZstdFile` supports all the members specified by :class:`io.BufferedIOBase`, except for :meth:`~io.BufferedIOBase.detach` and :meth:`~io.IOBase....
python, official-docs, cpython, P0
Local_Trusted_Corpus
11c915a3-1ceb-40ba-b88e-8da637125a00
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,844
supabase-export-v2
6b87520ee42a185d
is enforced only when :attr:`~CompressionParameter.nb_workers` >= 1. Each compression job is completed in parallel, so this value can indirectly impact the number of active threads. A value of zero causes the value to be selected automatically.
trusted_official_docs
CPython Docs
is enforced only when :attr:`~CompressionParameter.nb_workers` >= 1. Each compression job is completed in parallel, so this value can indirectly impact the number of active threads. A value of zero causes the value to be selected automatically.
is enforced only when :attr:`~CompressionParameter.nb_workers` >= 1. Each compression job is completed in parallel, so this value can indirectly impact the number of active threads. A value of zero causes the value to be selected automatically.
python, official-docs, cpython, P0
Local_Trusted_Corpus
128fe421-b1db-47ca-a00e-06cd64e32f6b
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,787
supabase-export-v2
2c1f8edd2f1de481
are considered "ultra" compression and require more memory than other levels. Negative values can be used to trade off faster compression for worse compression ratios. Setting the level to zero uses :attr:`COMPRESSION_LEVEL_DEFAULT`.
trusted_official_docs
CPython Docs
are considered "ultra" compression and require more memory than other levels. Negative values can be used to trade off faster compression for worse compression ratios. Setting the level to zero uses :attr:`COMPRESSION_LEVEL_DEFAULT`.
are considered "ultra" compression and require more memory than other levels. Negative values can be used to trade off faster compression for worse compression ratios. Setting the level to zero uses :attr:`COMPRESSION_LEVEL_DEFAULT`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
135eda39-4e69-4f82-8a63-bd0482a5b915
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,695
supabase-export-v2
5bbc3491ca5b23af
argument is a Python dictionary containing advanced decompression parameters. The valid keys and values for compression parameters are documented as part of the :class:`DecompressionParameter` documentation. The *zstd_dict* argument is an instance of :class:`ZstdDict` containing trained data used during compression. T...
trusted_official_docs
CPython Docs
argument is a Python dictionary containing advanced decompression parameters. The valid keys and values for compression parameters are documented as part of the :class:`DecompressionParameter` documentation. The *zstd_dict* argument is an instance of :class:`ZstdDict` containing trained data used during compression. T...
argument is a Python dictionary containing advanced decompression parameters. The valid keys and values for compression parameters are documented as part of the :class:`DecompressionParameter` documentation. The *zstd_dict* argument is an instance of :class:`ZstdDict` containing trained data used during compression. T...
python, official-docs, cpython, P0
Local_Trusted_Corpus
154c6aed-3347-4aff-84ff-25403a333d60
CPython Docs
file://datasets/cpython/Doc/library/compression.zstd.rst
unknown
c50e1795-f599-499a-b1fd-932066490d14
15,851
supabase-export-v2
85f6405b70d08522
containing the advanced decompression parameter keys that can be used when decompressing data. Parameters are optional; any omitted parameter will have it's value selected automatically. The :meth:`~.bounds` method can be used on any attribute to get the valid values for that parameter.
trusted_official_docs
CPython Docs
containing the advanced decompression parameter keys that can be used when decompressing data. Parameters are optional; any omitted parameter will have it's value selected automatically. The :meth:`~.bounds` method can be used on any attribute to get the valid values for that parameter.
containing the advanced decompression parameter keys that can be used when decompressing data. Parameters are optional; any omitted parameter will have it's value selected automatically. The :meth:`~.bounds` method can be used on any attribute to get the valid values for that parameter.
python, official-docs, cpython, P0
Local_Trusted_Corpus