Lines Matching refs:thread
3 /* Interface to Sjoerd's portable C thread library */
194 locked (even by the same thread), waiting for another thread to release\n\
218 Release the lock, allowing another thread that is blocked waiting for\n\
220 but it needn't be locked by the same thread that unlocks it.");
289 A lock is not owned by the thread that locked it; another thread may\n\
290 unlock it. A thread attempting to lock a lock that it has already locked\n\
291 will block until another thread unlocks it. Deadlocks may ensue.");
393 and another thread holds the lock, the method will return False\n\
394 immediately. If `blocking` is True and another thread holds\n\
400 Precisely, if the current thread already holds the lock, its\n\
424 Release the lock, allowing another thread that is blocked waiting for\n\
426 and must be locked by the same thread that unlocks it; otherwise a\n\
430 current thread, release() needs to be called as many times for the lock\n\
627 (both when a thread is being terminated, or a thread-local object
629 - it must not be possible for thread-state dicts to be involved in
631 objects referenced from a reachable thread-state dict, even though
633 - the death of a thread-state dict must still imply destruction of the
634 corresponding local dicts in all thread-local objects.
639 Each thread-state holds a separate localdummy for each local object
641 and each thread-local object holds a dict mapping /weak references/
645 - only the thread-state dict holds a strong reference to the dummies
646 - only the thread-local object holds a strong reference to the local dicts
648 references to the thread-local objects
649 - as soon as a thread-state dict is destroyed, the weakref callbacks of all
650 dummies attached to that thread are called, and destroy the corresponding
651 local dicts from thread-local objects
652 - as soon as a thread-local object is destroyed, its local dicts are
653 destroyed and its dummies are manually removed from all thread states
654 - the GC can do its work correctly when a thread-local object is dangling,
655 without any interference from the thread-state dicts
659 by the thread-local object which has created the localdummy, which should
716 /* Create and register the dummy for the current thread.
728 "Couldn't get thread-state dictionary");
801 self->key = PyUnicode_FromFormat("thread.local.%p", self);
854 /* Remove all strong references to dummies from the thread states */
905 "Couldn't get thread-state dictionary");
922 /* we need to get rid of ldict from thread so
1037 /* If the thread-local object is still alive and not being cleared,
1098 _PyErr_WriteUnraisableMsg("in thread started by", boot->func);
1143 "thread is not supported for isolated subinterpreters");
1164 PyErr_SetString(ThreadError, "can't start new thread");
1176 Start a new thread and return its identifier. The thread will call the\n\
1178 taken from the optional dictionary kwargs. The thread exits when the\n\
1179 function returns; the return value is ignored. The thread will also exit\n\
1195 thread to exit silently unless the exception is caught.");
1215 Simulate the arrival of the given signal in the main thread,\n\
1218 A subthread can use this function to interrupt the main thread.\n\
1243 PyErr_SetString(ThreadError, "no current thread ident");
1252 Return a non-zero integer that uniquely identifies the current thread\n\
1254 This may be used to identify per-thread resources.\n\
1258 A thread's identity may be reused for another thread after it exits.");
1271 Return a non-negative integer identifying the thread as reported\n\
1273 particular thread within a system.");
1288 the main thread. The returned number comprises all threads created\n\
1299 /* Tricky: this function is called when the current thread state
1336 hangs to the thread state. */
1350 Set a sentinel lock that will be released when the current thread\n\
1392 Return the thread stack size used when creating new threads. The\n\
1396 If changing the thread stack size is unsupported, a ThreadError\n\
1411 PyObject *exc_traceback, PyObject *thread)
1413 /* print(f"Exception in thread {thread.name}:", file=file) */
1414 if (PyFile_WriteString("Exception in thread ", file) < 0) {
1419 if (thread != Py_None) {
1420 if (_PyObject_LookupAttr(thread, &_Py_ID(name), &name) < 0) {
1444 if (PyFile_WriteString("<failed to get thread name>", file) < 0) {
1477 {"thread", "Thread"},
1511 PyObject *thread = PyStructSequence_GET_ITEM(args, 3);
1516 if (thread == Py_None) {
1517 /* do nothing if sys.stderr is None and thread is None */
1521 file = PyObject_GetAttrString(thread, "_stderr");
1528 when the thread was created */
1537 thread);
1547 "excepthook(exc_type, exc_value, exc_traceback, thread)\n\
1592 // Initialize the C thread library