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
Based on some conversations with @johnabass it is probably best to not try to re-use workers, but spawn goroutines for them instead up to the specified limit (using a semaphore or atomic counter). Then as they complete their work, they decrement the semaphore/atomic counter & simply exit.
CPU costly things to be aware of & should probably be passed in to the new goroutine:
Do check to make sure that the above can be passed safely as to not create synchronization issues.
Lastly, to help us understand if this is a better approach we should qualify the throughput (delivery rate & CPU usage) through testing before & after.
Ideally the outbound sender worker pools should auto-scale up or down based on the work load present in the queue.
Something along the lines of:
The text was updated successfully, but these errors were encountered: