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

Remove goroutine #293

Merged
merged 2 commits into from
Mar 26, 2024
Merged

Conversation

peterebden
Copy link
Member

@peterebden peterebden commented Mar 25, 2024

Simpler version of #292 ; remove the goroutine and rely on our channels being longer than the number of responses we get (which we think should always be the case)
Should save a bit of CPU too since we're not spinning up so many routines.

Removed the channel-closing stuff so we'll never get a 'send on closed channel', we just bail out of the loop when we get one that's marked Done and let the GC clean it up later.

fische
fische previously approved these changes Mar 26, 2024
Copy link
Contributor

@fische fische left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM! We'll have to keep an eye on memory usage, to make sure those channels do get GC-ed.

@peterebden peterebden merged commit 6c38863 into thought-machine:master Mar 26, 2024
5 checks passed
@peterebden peterebden deleted the remove-goroutine branch March 26, 2024 14:14
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