Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      thrd_join

      From cppreference.com
      <c‎ |thread
       
       
      Concurrency support library
       
      Defined in header<threads.h>
      int thrd_join(thrd_t thr,int*res);
      (since C11)

      Blocks the current thread until the thread identified bythr finishes execution.

      Ifres is not a null pointer, the result code of the thread is put to the location pointed to byres.

      The termination of the threadsynchronizes-with the completion of this function.

      The behavior is undefined if the thread was previously detached or joined by another thread.

      Contents

      [edit]Parameters

      thr - identifier of the thread to join
      res - location to put the result code to

      [edit]Return value

      thrd_success if successful,thrd_error otherwise.

      [edit]References

      • C17 standard (ISO/IEC 9899:2018):
      • 7.26.5.6 The thrd_join function (p: 280-281)
      • C11 standard (ISO/IEC 9899:2011):
      • 7.26.5.6 The thrd_join function (p: 384-385)

      [edit]See also

      detaches a thread
      (function)[edit]
      terminates the calling thread
      (function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=c/thread/thrd_join&oldid=138884"

      [8]ページ先頭

      ©2009-2025 Movatter.jp