Skip to content

add 'dogecoin_node_group_event_loopbreak(dogecoin_node_group)' #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

UsaRandom
Copy link
Contributor

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 just dogecoin_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() wraps event_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.

@edtubbs
Copy link
Collaborator

edtubbs commented Feb 23, 2024

Thanks! Have a look at #207 for a related update. It addresses the exit issue and should resolve your event loop problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants