I have a scheduler written in C that repetitively executes batches if C functions in multi-threaded fashion:
- Mutually exclusive groups of C functions update one reactor state (i.e. the total set of C functions is partitioned around a smaller set of reactor states);
- The C functions are scheduled in and out;
- Each C function can call into a Julia callback passing it the reactor state.
As a setup my thinking is as follows:
- Define a Julia struct holding the reactor state.
- The Julia reactor state should have one field holding a reference to a Julia interpreter engine;
- In C initialize the Julia reactor state at reactor creation; this includes starting the Julia interpreter engine;
- Call reaction callbacks from reactor’s Julia engine.
Is this feasible?