I would like to know if there is a way to test whenever a thread is completed and is waiting to join. My guess was using time_join. is there an explicit way to test it?
There is no API for this in boost::thread . I think the reason is that the thread can be detached and made non- joinable . The best defense is probably a wrapper and a flag.
boost::thread
joinable
timed_join with a duration of 0 can be seen as try_join, so yes, you can check if the stream is complete. I think there is already a function request to add this try_join function to Boost.Thread.
Source: https://habr.com/ru/post/1307209/More articles:Is there a macro tool for Java or C #? - javaIPhone user interface design - designWhy can I delete "delete p;" but not "delete (p + 1);"? Why does delete require an lvalue? - c ++Make emacs autocomplete Ruby methods - ruby ββ| fooobar.comHow to get a tooltip in WPF - c #How to fine-tune html objects? - phpHow to make one PHP script run another and write its output? - redirectHow can I subclass NSDate? - objective-cAn alternative to salvation in Ruby? - ruby ββ| fooobar.comHow to save java.util.Set via JPA? - javaAll Articles