lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] Shazwazza commented on issue #305: Investigate how we can load external assemblies when running Lucene.Net.Benchmarks on the command line
Date Tue, 06 Oct 2020 11:09:32 GMT

Shazwazza commented on issue #305:
URL: https://github.com/apache/lucenenet/issues/305#issuecomment-704197007


   For netcore this is really easy and you can unload them. In .NET Framework this is more
difficult and you cannot unload them unless you create and destroy custom AppDomains at runtime
which is possible but you cannot flow data between the domains unless you are using string
serialization or remoting (all ugly). In netcore you just use AssemblyLoadContext, there are
samples here https://github.com/dotnet/samples/tree/master/core/tutorials/Unloading (https://github.com/dotnet/samples/blob/master/core/tutorials/Unloading/Host/Program.cs)

   
   But the way benchmarkdotnet works is underneath for the execution it dynamically creates
a netcore project and compiles it with the references that you are telling it to, it then
runs the benchmarks against the compiled .exe output. So by using benchmarkdotnet you are
sort of already loading in external assemblies. It's been a while since I looked but you can
control how benchmarkdotnet builds it's program. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message