add 'dogecoin_node_group_event_loopbreak(dogecoin_node_group)' #206
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
i have the spv node event_loop
dogecoin_node_group_event_loop()
running on a separate thread but i've had issues getting the event_loop call to always return (exit) using justdogecoin_node_group_shutdown()
(symptomatic of another issue?)all the peers disconnect, but since the event_loop call doesn't always return, sometimes my thread hangs (and apparently you can't just kill threads now in dot-net...)
the new function
dogecoin_node_group_event_loopbreak()
wrapsevent_base_loopbreak()
, which makes the event_loop call return.event_base_loopbreak
Abort the active event_base_loop() immediately.
event_base_loop() will abort the loop after the next event is completed; event_base_loopbreak() is typically invoked from this event's callback. This behavior is analogous to the "break;" statement.
Subsequent invocations of event_base_loop() will proceed normally.