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

Session destructor #95

Open
edovanveen opened this issue Jan 19, 2024 · 0 comments
Open

Session destructor #95

edovanveen opened this issue Jan 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@edovanveen
Copy link
Collaborator

edovanveen commented Jan 19, 2024

Session currently has no destructor, because we cannot terminate the neuron process while inprocess:

>> neuronConfig = clibConfiguration("neuron")
 
neuronConfig =
 
  CLibraryConfiguration for neuron with properties:
 
    InterfaceLibraryPath: "Z:\Git\matlabneuron\neuron\neuronInterface.dll"
               Libraries: ["Z:\Git\matlabneuron\source\libnrniv.a"    "C:\Program Files\MATLAB\R2023b\extern\lib\win64\mingw64\libmex.lib"]
                  Loaded: 1
           ExecutionMode: inprocess
               ProcessID: 4872
 
>> neuronConfig.unload
Error using matlab.cppclient.CLibraryConfiguration/unload
Unloading of library is not supported for 'inprocess' execution mode. Restart MATLAB to unload and then call
'clibConfiguration('neuron','ExecutionMode','outofprocess')'.

Is there another way to terminate neuron, so we can implement a Session destructor?

Once Session has a destructor, we can also add a mlock and munlock to keep it in memory after a clear all, to make it more singleton-esque.

@edovanveen edovanveen added the enhancement New feature or request label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant