According to the manual, Tasks are coroutines. The Wikipedia article <https://en.wikipedia.org/wiki/Coroutine> relates them to generators. For any recovering C programmers in the audience, this related article <http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html> might remind you why you prefer to be here in the land of honest macros.
On Thursday, October 13, 2016 at 6:02:18 PM UTC-4, David Anthoff wrote: > > I don't think so. I think the python generator functions are modeled after > the C# yield keyword, which is a way to implement an iterator. I believe > tasks are quite a different beast. At least in C# tasks interact with the > async/await story really well. I think the julia tasks might be similar to > that, but I'm not sure. > > In any case, having a yield keyword to implement standard iterators would > be > fantastic. Simply a way to get the start, next and done methods > implemented > automatically. > > > -----Original Message----- > > From: julia...@googlegroups.com <javascript:> [mailto:julia- > <javascript:> > > us...@googlegroups.com <javascript:>] On Behalf Of Mauro > > Sent: Thursday, October 13, 2016 6:00 AM > > To: julia...@googlegroups.com <javascript:> > > Subject: Re: [julia-users] python-like generators? > > > > Isn't this the same as tasks in Julia? > > http://docs.julialang.org/en/release-0.5/stdlib/parallel/ > > > > Although, note that their performance is not on par with start-next-done > > iteration. > > > > On Thu, 2016-10-13 at 14:46, Neal Becker <ndbe...@gmail.com > <javascript:>> wrote: > > > julia-0.5 supports generator expressions, ala python, which is very > nice. > > > > > > Any thoughts on supporting the more general python generator > > > functions, as described e.g.: https://wiki.python.org/moin/Generators? > > > > I haven't used them much myself (well, once), but they seem a really > cool > > idea. > >