Is there a mechanism that I can use to determine if a pthread thread is running or exiting? Is there a way for pthread_join () that can expire after a certain period of time if the thread has not yet exited?
I just finished migrating a stream in a C ++ class and saved a state variable that can be checked later.
If you are targeting Linux only, use http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_tryjoin_np.3.html
- POSIX, "pthread_timedjoin" http://www.opengroup.org/onlinepubs/000095399/xrat/xsh_chap02.html#tag_03_02_08_21 - pthread_cond_timedwait -.
Source: https://habr.com/ru/post/1716646/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1716641/best-practices-when-limiting-changes-to-specific-fields-with-linq2sql&usg=ALkJrhgaS74CIsc71yxfaRd6oHrcgjAhLwFirefox 3.5 crashes when rendering TABLE - performanceКак получить доступ к изображениям в каталоге за пределами веб-приложения - web-applicationsPlanning Script Using PHP / MySQL - Logic Help - phpQt 4.5 third-party installation programs - installationUsing Int32.Parse - c #.NET developer migrates to ubuntu for development - pythonLack of synchronized methods in Java - javajavascript interrupt event - javascriptIntermediate Transmission Time - c #All Articles