Skip to content
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

Don't require a connection id to use mg_wakeup #2788

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jameshilliard
Copy link
Contributor

Makes broadcasts cleaner I think.

See: #2786

@scaprile
Copy link
Collaborator

Sorry, this breaks the very essence of having this function in the first place.
https://mongoose.ws/documentation/tutorials/core/multi-threaded/

@jameshilliard
Copy link
Contributor Author

Sorry, this breaks the very essence of having this function in the first place.

Maybe I'm misunderstanding but I thought the purpose of this function is to pass data to the mongoose thread from a separate thread. I'm not sure how this would break anything.

@cpq
Copy link
Member

cpq commented Jul 4, 2024

@jameshilliard you can send wakeup to the listening connection, if you don't have any specific connection to wake up.

@jameshilliard
Copy link
Contributor Author

you can send wakeup to the listening connection, if you don't have any specific connection to wake up.

I mean, you technically can but it seems to be a lot of excess complexity vs something along these lines, sending to the listing connection for a broadcast like this just seems to be weird to me. You can also see in the multithreading example how this is also a pretty significant reduction in lines of code and cleaner api for broadcast type operations.

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.

3 participants