EWL C++ is Level-1 thread safe. That is:
Simultaneous use of allocators such as new and malloc are thread safe.
Simultaneous use of global objects such as cin and cout is not safe. The programmer is responsible for using thread synchronization primitives to avoid such situations. EWL C++ provides an extension to standard C++ (std::mutex) to aid in such code. For example:
#include <iostream> #include <iomanip> #include <mutex.h> std::mutex cout_lock; int main() { cout_lock.lock(); std::cout << "The number is " << std::setw(5) << 20 << '\n'; cout_lock.unlock(); }
Note that if only one thread is accessing a standard stream then no synchronization is necessary. For example, one could have one thread handling input from cin, and another thread handling output to cout, without worrying about mutex objects.