Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

Commented Feature: Support usage of R.NET from multiple App Domains [92]

$
0
0
One problem that comes up for us quite a bit when using R.NET from the RProvider is that we need to load it into multiple appdomains simultaneously. The native R.DLL is obviously AppDomain agnostic, but the R.NET instances are completely isolated.

The concrete problem is that in the second appdomain, the R.DLL fails during initialization because it is already initialized.

Any ideas on how we could make that work? Seems like R.DLL instances would have to be managed through some native code, or we would need some process-wide flag to record the fact that R.DLL has already been initialized.

Basically this is the same issue as the multiple-initialization problem.
Comments: Sure, I will put something together today. The discussion you refer to is talking about creating an AppDomain that has restricted permissions. We don't use AppDomains for that purpose. Rather, we do so to get a level of isolation when code of multiple versions runs inside the same process. I'm not an expert on AppDomains, but I am pretty sure running R.NET is a context that doesn't have full trust is not going to work, because you need to be able to interop with native code. For obvious reasons, if you can call native code from your application, then any .NET level access restrictions can be bypassed trivially. So I think basically such a setup doesn't work.

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>