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

CoreCLR: NSAutoreleasePool for every thread #11256

Closed
rolfbjarne opened this issue Apr 21, 2021 · 3 comments · Fixed by #11749
Closed

CoreCLR: NSAutoreleasePool for every thread #11256

rolfbjarne opened this issue Apr 21, 2021 · 3 comments · Fixed by #11749
Assignees
Labels
dotnet An issue or pull request related to .NET (6) dotnet-pri0 .NET 6: required for stable release feature A feature to be implemented
Milestone

Comments

@rolfbjarne
Copy link
Member

rolfbjarne commented Apr 21, 2021

CoreCLR has support for an NSAutoreleasePool for thread pool work items (dotnet/runtime#47592), but it's missing support for having an NSAutoreleasePool for every thread.

This issue is to track the required work in CoreCLR and in our own code.

Ref: dotnet/designs#197 (comment)
Ref: dotnet/designs#197 (comment)
Ref: dotnet/runtime#52023

@rolfbjarne rolfbjarne added dotnet An issue or pull request related to .NET (6) dotnet-pri0 .NET 6: required for stable release feature A feature to be implemented labels Apr 21, 2021
@rolfbjarne rolfbjarne added this to the .NET 6 milestone Apr 21, 2021
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Apr 21, 2021
…leasePool to the MonoVM bridge.

The current implementation is MonoVM-specific, and won't work with CoreCLR
(something else will have to be implemented for CoreCLR, which is tracked
here: dotnet#11256).
rolfbjarne added a commit that referenced this issue Apr 21, 2021
…leasePool to the MonoVM bridge. (#11257)

The current implementation is MonoVM-specific, and won't work with CoreCLR
(something else will have to be implemented for CoreCLR, which is tracked
here: #11256).
@AaronRobinsonMSFT
Copy link
Member

@jkoritzinsky and @kouvel Do either of you have thoughts on how to extend the work in dotnet/runtime#47592 to enable support for all threads?

@akoeplinger
Copy link
Member

@rolfbjarne with the support added in dotnet/runtime#52023 we can use the System.Threading.Thread.EnableAutoreleasePool switch for Mono too and replace the custom code that uses the mono profiler for hooking thread start events in .NET 6 right?

@rolfbjarne
Copy link
Member Author

@akoeplinger yes, that would be ideal.

@rolfbjarne rolfbjarne self-assigned this May 31, 2021
rolfbjarne added a commit that referenced this issue Jun 2, 2021
… background threads for both MonoVM and CoreCLR. Fixes #11256. (#11749)

Fixes #11256.
@ghost ghost locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dotnet An issue or pull request related to .NET (6) dotnet-pri0 .NET 6: required for stable release feature A feature to be implemented
Projects
None yet
3 participants