vitreo12 / JuliaCollider

Julia's JIT compilation for low-level audio synthesis and prototyping in SuperCollider.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GC performing even if RT thread is running

vitreo12 opened this issue · comments

As already hinted in the code, perhaps it could be possible to make sure that the GC can perform its routinary collections while the audio thread is running a Julia UGen. This is only possible thanks to the fact that the RT allocation pool that the GC uses is thread safe (already implemented by modifying SC allocation pool - SCAllocPoolSafe.h/cpp), and no contention of data would be present.

Some things, however, still must remain:

  1. No allocation/deallocation of objects should ever happen when a GC collection is running.
  2. Must make sure that no allocation, then, is performed inside the perform macro call. (This should be granted, if the user uses Buffer and Data. If he's not, he's just not writing JuliaCollider code anyway...)