Tasks are lighweight, not at all like threads. You can literally have thousands of them without any issues. Multi-threaded julia is a work-in-progress. Currently each julia process has a single thread of execution and tasks switch whenever there is I/O involved or on an explicit yield(). libuv provides the underlying event-driven I/O, timers, etc.
On Tue, Jul 7, 2015 at 6:02 PM, andrew cooke <[email protected]> wrote: > > it seems to me that coroutines (Tasks) in julia are very much intended for > "heavyweight" multithread use. > > but lazy streams are really useful in general (they transformed how i use > python), and even full-on coroutines can be useful in some single-threaded > applications. so i wonder if there's a need for a lighter-weight > implementation? maybe something already exists - it's not clear to me this > needs to be part of the base language. > > andrew >
