Skip to content

Conversation

@charlysotelo
Copy link

Fixes a possible data race between Shutdown and ServeNextRequest

@slayercat
Copy link
Owner

Thank you very much for your interest in the project.
The issue of potentially ongoing activities during shutdown has indeed caught my attention. However, I believe that attempting to use locks during "acquisition" without considering the specific use cases does not adequately address this problem.
There are two viable approaches:

My personal preference is to implement lock-free reference counting during processing and wait during shutdown.
An alternative method could be to use read-write locks, allowing multiple simultaneous operations while permitting shutdown to occur in only one place. However, this approach would require simulation to determine if the implementation is reasonable and if the performance impact falls within acceptable limits.

I'm very much looking forward to discussing these aspects with you and conducting more test cases and simulations to confirm the feasibility of the relevant processes.
Once again, thank you for your interest in this matter.

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