4 ms·
Erm, "Add multithreading support" is the very first item?
by ezrast 8y ago
Erm, "Add multithreading support" is the very first item?
- lloeki 8y agoMultithreading and a GIL gives you concurrency, not parallelism. e.g you can spawn many threads in MRI but they'll still be waiting on each other. Hell I even implemented[0] Go-style CSP channels and coroutines atop of Ruby's Thread and Queue (which uses Thread), fully aware it would not magically give me parallelism. [0]: https://gitlab.com/lloeki/normandy https://gitlab.com/lloeki/normandy
- ezrast 8y agoThat's all fine and dandy but irrelevant since Crystal doesn't have a GIL (or, indeed, an interpreter). Threading does imply parallelism in this context.
- lloeki 8y agoIndeed, and there seems to have been some work done to great effect[0]. Unfortunately the corresponding branch is quite stale[1]. Anyway, my comment was more about the fact that the "Concurrency / Add multithreading support" section of the roadmap was quite unclear about parallelism. Mentioning MRI's GIL was merely an example as to why any kind of thread interlocking could turn things into non- (or very limited) parallelism, hence patagonia's question being quite legitimate. [0]: https://twitter.com/sdogruyol/status/833369972919382019 https://twitter.com/sdogruyol/status/833369972919382019 [1]: https://github.com/crystal-lang/crystal/tree/thread-support https://github.com/crystal-lang/crystal/tree/thread-support