Isolate - sloanyang/raspberrry2v8 GitHub Wiki

##Isolate

Isolate is an isolated V8 virtual machine instance. It has its own heap and GC. There are no processes in a system. Isolates are used instead. Technically, all isolates run in a single address space.

Each program runs in its own isolate and can't directly access other isolates objects. To communicate, isolates can use RPC mechanism provided by the kernel.

##Event loop

System uses global event loop to dispatch tasks for the whole system. At the same time each isolate has its own execution stack (kinda like thread) and event queue. Before executing a callback, event loop switches system to the right isolate stack. This way it's possible to interrupt long-running code like

for (;;) ;

This also allows to run CPU-bound applications without blocking the whole system. Note: long-running code interrupt system haven't been merged into master branch yet.