Lines Matching defs:thread
3021 /* test_thread_state spawns a thread of its own, and that thread releases
3023 * thread finishes, because the thread uses a PyObject (the callable) that
3073 /* Start a new thread with our callback. */
3075 /* Make the callback with the thread lock held by this thread */
3077 /* Do it all again, but this time with the thread-lock released */
3080 PyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */
3083 /* And once more with and without a thread
3090 PyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */
3114 * run from any python thread.
3772 /* Test that the fatal error from not having a current thread doesn't
3807 /* Since no new thread state was created, there is no exception to
3808 propagate; raise a fresh one after swapping in the old thread
4525 /* Allocate a Python thread state for this thread */
4538 /* Destroy the Python thread state for this thread */
4551 long thread;
4571 thread = PyThread_start_new_thread(temporary_c_thread, &test_c_thread);
4572 if (thread == -1) {
4573 PyErr_SetString(PyExc_RuntimeError, "unable to start the thread");