cpp/thread/stop callback/~stop callback

Destroys the object.

If has a  with associated stop-state, deregisters the callback from it.

If the callback function is being invoked concurrently on another thread, the destructor does not complete until the callback function invocation is complete. If the callback function is being invoked on the same thread the destructor is being invoked on, then the destructor returns without waiting for callback invocation to complete (see Notes).