Function concore::v1::shutdown¶
Defined in File init.hpp
Function Documentation¶
-
void
concore::v1::shutdown()¶ Shuts down the concore library.
This can be called at the end of the program to stop the worker threads and cleanup the enqueued tasks. In general, the library is destroyed automatically at the end, so this is not necessarily needed. However, we might want to call this in unit tests to ensure that the library is in a clean state for the next test.
- Warning
It is forbidden to shutdown the library while it’s still in use. All tasks need to be finished executing, and no other objects/functions are accessed anymore.
- Warning
After shutdown, any call to the library except an initialization-specific call leads to undefined behavior.