ThakeeNathees / pocketlang

A lightweight, fast embeddable scripting language.
https://thakeenathees.github.io/pocketlang/
MIT License
1.52k stars 80 forks source link

Parallelism & concurrency along with synchronous & asynchronous programming #130

Open dumblob opened 3 years ago

dumblob commented 3 years ago

Any plans for parallelism & concurrency?

And an orthogonal question - any plans to support seamless synchronous & asynchronous programming?

With "seamless" I don't mean how majority of languages implement it nowadays (C#, Javascript, Rust, Python, ...) because that's insane ("async" is infectious - once you use it you need to use it all the way to the root; in addition to that one needs 2 variants of each stdlib function) pretty much the same level of insanity as async everything.

With "seamless" I mean something closer to what I described here (just to clarify: ECS is a fully synchronous pipeline - therefore a good example to demonstrate the "buffer events at the beginning of the synchronous pipeline and defer all from-this-pipeline-emitted events to the end of this pipeline and first then dispatch them").

ThakeeNathees commented 3 years ago

For concurrency, we're supporting single threaded fibers (https://thakeenathees.github.io/pocketlang/language-api-fibers.html). Yet I still need to learn and adopt parallelism for pocketlang, I'll take a look at those references you've listed above. If you like to share implementation details, please open an issue. It's always a pleasure to discuss cool new features.