You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless I am mis-reading the code (entirely possible), it appears as though Pistache::Http::Endpoint's shutdown() method can return before all service threads have completed. This method in turn calls SyncImpl::shutdown(). The latter is defined like so:
If this happens, that may create a race condition with some endpoint handlers still executing after the user thinks the endpoint has "shutdown".
I don't know enough about the reactor pattern @oktal employed, but my guess is the behaviour of shutdown() should probably block until it actually has shut down.
The text was updated successfully, but these errors were encountered:
Can someone create a PR that adds a unit test which reliably reproduces the problem? The PR might not get merged (certainly won't until the bug is fixed), but a reliable repro would be super handy. Its ok it the PR needs to expose/hack/modify the core of pistache in order to rig the failure, since the existing class hierarchy does not lend it self to C++ mocks.
Unless I am mis-reading the code (entirely possible), it appears as though
Pistache::Http::Endpoint
'sshutdown()
method can return before all service threads have completed. This method in turn callsSyncImpl::shutdown()
. The latter is defined like so:If this happens, that may create a race condition with some endpoint handlers still executing after the user thinks the endpoint has "shutdown".
I don't know enough about the reactor pattern @oktal employed, but my guess is the behaviour of
shutdown()
should probably block until it actually has shut down.The text was updated successfully, but these errors were encountered: