|
|
Subscribe / Log in / New account

Ratiu: A tale of two toolchains and glibc

Ratiu: A tale of two toolchains and glibc

Posted Oct 3, 2021 12:57 UTC (Sun) by iainn (guest, #64312)
In reply to: Ratiu: A tale of two toolchains and glibc by mpr22
Parent article: Ratiu: A tale of two toolchains and glibc

No, sorry, I was being a bit facetious.

But dlclose being unusable genuinely baffles me, coming from a high level (e.g. .NET) perspective. *Obviously* you want to be able to unload a plugin when you're done with it. In .NET you just use an AssemblyLoadContext.


to post comments

Ratiu: A tale of two toolchains and glibc

Posted Oct 3, 2021 13:50 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link] (2 responses)

It's funny that you mention .NET.

Because it does NOT support unloading of individual assemblies. You can "unload" the whole context but not individual assemblies.

Ratiu: A tale of two toolchains and glibc

Posted Oct 3, 2021 14:31 UTC (Sun) by iainn (guest, #64312) [Link] (1 responses)

I don't get what's so funny. You can spin an isolated AssemblyLoadContext, for an individual plugin.

You later Release() the whole context, which also cleans up any dependencies. That's a good thing.

Ratiu: A tale of two toolchains and glibc

Posted Oct 3, 2021 22:27 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link]

Well, AssemblyLoadContext is a fairly new feature (starting from .NET 3), before that there was no way to unload assemblies at all.

Second, ALC can not be unloaded forcefully. If it's in use, then "unload" method simply does nothing. This wholly depends on GC being able to enumerate all the references to the context.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds