Closed bontric closed 8 years ago
It might be a good idea to use tasklets instead. This will presumably cause less overhead as processes are quite heavy
please consider using asynchronous io library libuv for all client io. with that we don't need any thread synchronization (no locks, no semaphores etc), we can stop api calls (#7), and event processes that are needed for remote functions are also provided by the library and can be easily managed via libuv loop. and the best thing, it provides it all async.
check out this neovim uv implementation for details: https://github.com/neovim/python-client/blob/master/neovim/msgpack_rpc/event_loop/uv.py
We'll I am not sure, whether asynchronous IO is really needed in the first place. Threats are needed anyway otherwise it is not really possible to handle API calls like stop or pause.
that's not true, check out libuv docs and neovim implementation for details. libuv uses processes for each "child". these processes can be stopped. it's way more efficient and simple than the current implementation or tasklets.
We'll I am not sure, whether asynchronous IO is really needed in the first place. Threats are needed anyway otherwise it is not really possible to handle API calls like stop or pause.
thread sync is a real pain an we should avoid using threads
further discussion moved to #23
every remote function should be executed in a separate process
related to #7 and #3