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

Replace registry goroutine and channel with mutex #2243

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

gammazero
Copy link
Collaborator

This simplifies the registry code and makes it more efficient.

Originally, the registry was going to run many functions asynchronously in its own goroutine so that callers would not have to wait for the processing to finish. Over time, all the calls to registry functions became synchronous, so the channel and goroutine were nothing more than a synchronization mechanism. This PR replaces that goroutine with a simpler mutex.

This simplifies the registry code and makes it more efficient.

Originally, the registry was going to run many functions asynchronously in its own goroutine so that callers would not have to wait for the processing to finish. Over time, all the calls to registry functions became synchronous, so the channel and goroutine were nothing more than a synchronization mechanism. This PR replaces that goroutine with a simpler mutex.
@gammazero gammazero merged commit 2df9bf9 into main Sep 13, 2023
7 checks passed
@gammazero gammazero deleted the rm-registry-goroutine branch September 13, 2023 05:25
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.

1 participant