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

Run multiple threads of RScript.exe loading different dlls via CLRServer.exe #4

Open
SimonRi1985 opened this issue Nov 23, 2017 · 1 comment

Comments

@SimonRi1985
Copy link

SimonRi1985 commented Nov 23, 2017

Hi Jonathan,

I have a further question regarding the rDotNet package:

Currently one can only load one dll and R has to be restarted if another dll has to be loaded. The ref-manual states:

the .NET libraries are to be changed, the CLRServer process and R should be restarted.

This behavior in some situations can have some tricky side-effects. For example (to the best of my knowledge) it is not possible to parallely run two R-Scripts (via RScript.exe) where one R-Script has to load and use a.dll and the other process b.dll.

To be honest, I'm not an expert in .NET at all, but would it be possible to change CLRServer.exe in a way, that each R-Thread can assemble an own and independent connection to the server. (Like the DBI package for databases, where it is possible to independently connect to the database (if that is a good example))

Thanks and Cheers
Simon

@tr8dr
Copy link
Owner

tr8dr commented Nov 23, 2017

Each R session does indeed create a new thread on the server. However currently there is not support for one session to load dll 1 and another session to load dll 2. Currently, the CLRServer would load whichever DLL(s) were initially provided to it and all other R sessions would share the same DLL set.

It is possible to allow one session to load dll 1 and another to load dll 2. I would need to introduce a message to the API to indicate a DLL for loading. This would work as long as dll 1 and dll 2 do not collide (i.e. are in separate name spaces).

I can look at this next week.

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

No branches or pull requests

2 participants