marekjm / viuavm

Parallel virtual machine designed to reliably run massively concurrent programs
https://viuavm.org/
GNU General Public License v3.0
71 stars 11 forks source link

Execute foreign function calls in separate loop #131

Closed marekjm closed 8 years ago

marekjm commented 8 years ago

When Viua code calls a foreign function, store the request on a foreign call request vector. After all Viua processes finished running in the current burst, execute the calls to foreign functions - after a foreign call returns carry the return value to the requesting process and wake it up.

If this mechanism is implemented cleanly, it will be quite easy to push it to separate thread inside the VM and run the code concurrently.