std::thread::join()resolved to crash by throwing std::system_errorfor no_such_processif the thread is "invalid." Note that the case no_such_processis different from a thread that is not connecting (for which an error code invalid_argument).
std::thread::join()
std::system_error
no_such_process
invalid_argument
In what circumstances can this happen? Alternatively, what should I do to ensure that it is join()not suitable for this reason? I want the destructor to join()handle some threads, and, of course, I want the destructor to never throw an exception. What can make (properly constructed and not destroyed) the stream `invalid '.
join()
?
* nix , , , , (). , , .
, , , join() ?
std::thread::joinable(), 1. , . , , .
std::thread::joinable()
< > 1) , true false , . >
true
false
no_such_process ESRCH POSIX. POSIX std::thread::join(), , pthread_join().
ESRCH
pthread_join()
pthread_join
this
std::thread
, , undefined, bad reinterpret_cast .
reinterpret_cast
Source: https://habr.com/ru/post/1696362/More articles:printf с size_t с использованием FFI - cHow to print f size_t without warning in mingw-w64 gcc 7.1? - cRegex matching space after PCRE extension (php) - phpArrayList.containsAll does not use my usual equality function - javaDiscard the last character, except those that precede certain characters - regexpandas, если полная строка содержится в другом фрейме pandas - pythonUsing file name in json parsing (Haskell Aeson) - haskellWhy does System.IO.DirectoryInfo allow me to build a path ending in a form feed? - c #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/1696366/how-to-apply-regex-over-entire-dataframe-without-making-all-columns-to-character&usg=ALkJrhhynes6fKvITVPPLt7ZTQKV7cQhCwSemantic string similarity - bad results - pythonAll Articles