-
Notifications
You must be signed in to change notification settings - Fork 10
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
Replace goroutine with unlimited buffered channel #292
Conversation
Are we expecting more than a few events for a given action? If not, could we just make those channels buffered? |
Don't the workers send a periodic update once a minute or so? |
We could also get rid of that, or just have a buffer size of like 100 and deal with it if they fill up |
Just had a quick look at the worker code and it looks like it only publishes when Executing and when Completed.
Yeah we could even do that |
As discussed, I think we have potential ordering issues by dispatching things in separate goroutines. That was necessary to avoid blocking when sending to a channel if the receiver is slow.
This removes the goroutine and replaces it with a self-buffering channel-like thing which should maintain send order.
Also did a bit of housekeeping (because I wanted to use Go 1.22 range-over-int, which needed several other updates)