From 806c8af660e59525220f804bcdf27f4cb5c8ae87 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Fri, 21 Feb 2020 15:37:31 -0800 Subject: [PATCH] doc: add k_thread_join() to documentation Added to the section covering thread termination. Signed-off-by: Andrew Boie --- doc/reference/kernel/threads/index.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/reference/kernel/threads/index.rst b/doc/reference/kernel/threads/index.rst index 2dd5123058a..d057f8162ff 100644 --- a/doc/reference/kernel/threads/index.rst +++ b/doc/reference/kernel/threads/index.rst @@ -85,6 +85,12 @@ prior to returning, since the kernel does *not* reclaim them automatically. The kernel does not currently make any claims regarding an application's ability to respawn a thread that terminates. +In some cases a thread may want to sleep until another thread terminates. +This can be accomplished with the :cpp:func:`k_thread_join()` API. This +will block the calling thread until either the timeout expires, the target +thread self-exits, or the target thread aborts (either due to a +k_thread_abort() call or triggering a fatal error). + Thread Aborting ===============