[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Coroutine library scheduler
- From: "John Hind" <john.hind@...>
- Date: Mon, 24 Feb 2014 12:33:08 -0000
I do not have a suggestion for anything that already exists, but I do think something really powerful could be done with a coroutine scheduler for Lua.
For example, I would like to be able to say "yield this coroutine until some real-time criterion is met" ( yield(for 10 seconds), or yield(until packet received OR 20 seconds has elapsed) ). This would enable a style of single-threaded real-time programming similar to that offered by http://www.nodejs.org/ (event driven), except that scheduling coroutine resumes would be so much more powerful than just scheduling function execution (as in node.js) because it would maintain procedural context.
But that coroutine scheduling idea is just so technically sweet ...
> Message: 6
> Date: Mon, 24 Feb 2014 12:10:08 +0100
> From: Teto <email@example.com>
> Subject: Coroutine library scheduler
> To: Lua mailing list <firstname.lastname@example.org>
> Content-Type: text/plain; charset=UTF-8
> I am looking for a coroutine library that is able to :
> -handle dependancies between coroutines. For instance, a coroutine can
> be a child of another one, if I remove its daddy, it should die. The
> child coroutine could also block the daddy coroutine.
> -reuse these coroutines (I read it could improve performance)
> I've started created something like that (for a game) but I would
> prefer using a robust,well-tested implementation. Is there any or is it
> too specific ?
This email is free from viruses and malware because avast! Antivirus protection is active.