Skip to content

Commit 3358737

Browse files
committed
Mention that the new PyThread functions are uninterruptible.
1 parent cdf31e3 commit 3358737

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Include/cpython/pythread.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@
1616
PyAPI_FUNC(unsigned long) PyThread_start_joinable_thread(void (*func)(void *),
1717
void *arg,
1818
Py_uintptr_t* handle);
19+
/*
20+
* Join a thread started with `PyThread_start_joinable_thread`.
21+
* This function cannot be interrupted. It returns 0 on success,
22+
* a non-zero value on failure.
23+
*/
1924
PyAPI_FUNC(int) PyThread_join_thread(Py_uintptr_t);
25+
/*
26+
* Detach a thread started with `PyThread_start_joinable_thread`, such
27+
* that its resources are relased as soon as it exits.
28+
* This function cannot be interrupted. It returns 0 on success,
29+
* a non-zero value on failure.
30+
*/
2031
PyAPI_FUNC(int) PyThread_detach_thread(Py_uintptr_t);
2132

2233
// PY_TIMEOUT_MAX is the highest usable value (in microseconds) of PY_TIMEOUT_T

0 commit comments

Comments
 (0)