Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ServiceWorker release references to completed tasks. Fixes #854 #869

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

Open
dhohlin wants to merge 2 commits into Redth:master
base: master
Choose a base branch
Loading
from dhohlin:master

Conversation

@dhohlin
Copy link

@dhohlin dhohlin commented Mar 24, 2018

Prevent OutOfMemoryException

toSend.Add (cont);

// release references to completed tasks
toSend.RemoveAll(task => task.IsCompleted);
Copy link

@tristan-hyams tristan-hyams Apr 21, 2021
edited
Loading

Choose a reason for hiding this comment

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

I got pinged from a comment I opened 4 years ago.

This should help but I believe you want to check if Task.IsFaulted (as well) GC will throw a UnobservedTaskException if the error is not handled. Or you could add an AppDomain UnobservedTaskException handler.

https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.iscompleted?view=net-5.0

Completed => RanToCompletion, Faulted, or Canceled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@tristan-hyams tristan-hyams tristan-hyams left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /