The C++ support libraries, libCrun, libiostream, libCstd, and libC are multithread safe but are not async safe. This means that in a multithreaded application, functions available in the support libraries should not be used in signal handlers. Doing so can result in a deadlock situation.
It is not safe to use the following in a signal handler in a multithreaded application:
Iostreams
new and delete expressions
Exceptions