The C++ support libraries, libCrun, libiostream, and libCstd are multithread safe but are not async safe. Therefore, 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 features in a signal handler in a multithreaded application:
Iostreams
new and delete expressions
Exceptions