What about concurrency and parallelism? #147
-
How will steel scheme support them? Janet has fibers for concurrency and threads for parallelism. It passes queued messages between fibers and threads through channels. I personally found janet's constructs for concurrency and parallelism easier and more performant and more granular than raku's. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think janet event loop is a very good way of achieving concurrent IO operations. For CPU intensive tasks, there is no alternative to threads. Threads can be good if they don't cause problems. Things like software transactional memory and persistent data structure can help to write thread-safe programs. |
Beta Was this translation helpful? Give feedback.
The linked file is an example of running concurrent IO operations. However, there is not a built in event loop, so the async operations are handled via an async/await style, where you yield on blocking operations to the executor which is implemented in user space.
I have not made it a priority to implement non blocking (async) operations, however I will most likely include async file system operations. You can create async functions in dylibs as well, so for example you could have a non blocking web requests library.