lava-nc / lava

A Software Framework for Neuromorphic Computing
https://lava-nc.org
Other
555 stars 143 forks source link

Injector and Extractor Processes create multiple instances of MultiProcessing #730

Open gkarray opened 1 year ago

gkarray commented 1 year ago

Describe the bug At the moment, instantiating an Injector or Extractor Process creates a new instance of MultiProcessing (for each instance of Injector or Extractor) This is problematic because each instance of MultiProcessing creates its own multiprocessing.SharedMemory. These might lead to multiple memory leaks if not closed properly.

To reproduce current behavior Steps to reproduce the behavior:

  1. When I run code involving the Injector or Extractor Process...
  2. Multiple instances of MultiProcessing (separate from the ones the Runtime uses) are created.

Expected behavior I expect the Injector and Extractor Processes to use the same instance of MultiProcessing used by the Runtime.

Environment (please complete the following information):