Firstly, thanks for the great work to provide easy code to manage the pooling work.
Background
I am using the tunny with gin framework to do some heavy work triggered from user request, and too many heavy works might lead to cpu peak or memory issue in short time, I limit the tunny work count.
Concern
I hooked my tunny cleanup work with gin server shutdown, so if server is signaled to close, I get chance to close the pool. But I am afraid that if there is new job submitted after pool shutdown, the panic will happen. How to safely manage this?
Thanks.
Firstly, thanks for the great work to provide easy code to manage the pooling work.
Background
I am using the tunny with gin framework to do some heavy work triggered from user request, and too many heavy works might lead to cpu peak or memory issue in short time, I limit the tunny work count.
Concern
I hooked my tunny cleanup work with gin server shutdown, so if server is signaled to close, I get chance to close the pool. But I am afraid that if there is new job submitted after pool shutdown, the panic will happen. How to safely manage this?
Thanks.