File tree Expand file tree Collapse file tree 2 files changed +17
-19
lines changed Expand file tree Collapse file tree 2 files changed +17
-19
lines changed Original file line number Diff line number Diff line change 22# error "this header file must not be included directly"
33#endif
44
5+ /* Thread joining APIs.
6+ *
7+ * These APIs have a strict contract:
8+ * - Either PyThread_join_thread or PyThread_detach_thread must be called
9+ * exactly once with the given handle.
10+ * - Calling neither PyThread_join_thread nor PyThread_detach_thread results
11+ * in a resource leak until the end of the process.
12+ * - Any other usage, such as calling both PyThread_join_thread and
13+ * PyThread_detach_thread, or calling them more than once (including
14+ * simultaneously), results in undefined behavior.
15+ */
16+ PyAPI_FUNC (unsigned long ) PyThread_start_joinable_thread (void (* func )(void * ),
17+ void * arg ,
18+ Py_uintptr_t * handle );
19+ PyAPI_FUNC (int ) PyThread_join_thread (Py_uintptr_t );
20+ PyAPI_FUNC (int ) PyThread_detach_thread (Py_uintptr_t );
21+
522// PY_TIMEOUT_MAX is the highest usable value (in microseconds) of PY_TIMEOUT_T
623// type, and depends on the system threading API.
724//
Original file line number Diff line number Diff line change @@ -20,25 +20,6 @@ PyAPI_FUNC(unsigned long) PyThread_start_new_thread(void (*)(void *), void *);
2020PyAPI_FUNC (void ) _Py_NO_RETURN PyThread_exit_thread (void );
2121PyAPI_FUNC (unsigned long ) PyThread_get_thread_ident (void );
2222
23- #if !defined(Py_LIMITED_API )
24- /* Thread joining APIs.
25- *
26- * These APIs have a strict contract:
27- * - Either PyThread_join_thread or PyThread_detach_thread must be called
28- * exactly once with the given handle.
29- * - Calling neither PyThread_join_thread nor PyThread_detach_thread results
30- * in a resource leak until the end of the process.
31- * - Any other usage, such as calling both PyThread_join_thread and
32- * PyThread_detach_thread, or calling them more than once (including
33- * simultaneously), results in undefined behavior.
34- */
35- PyAPI_FUNC (unsigned long ) PyThread_start_joinable_thread (void (* func )(void * ),
36- void * arg ,
37- Py_uintptr_t * handle );
38- PyAPI_FUNC (int ) PyThread_join_thread (Py_uintptr_t );
39- PyAPI_FUNC (int ) PyThread_detach_thread (Py_uintptr_t );
40- #endif
41-
4223#if (defined(__APPLE__ ) || defined(__linux__ ) || defined(_WIN32 ) \
4324 || defined(__FreeBSD__ ) || defined(__OpenBSD__ ) || defined(__NetBSD__ ) \
4425 || defined(__DragonFly__ ) || defined(_AIX ))
You can’t perform that action at this time.
0 commit comments