On 6/16/2012 9:19 AM, Randy MacDonald wrote:
On 6/10/2012 1:15 AM, BGB wrote:
meanwhile, I have spent several days on-off pondering the mystery of
if there is any good syntax (for a language with a vaguely C-like
syntax), to express the concept of "execute these statements in
parallel and continue when all are done".
I believe that the expression in Dyalog APL is:
⍎&¨statements
or
{execute}{spawn}{each}statements.
I recently thought about it off-list, and came up with a syntax like:
async! {A}&{B}&{C}
but, decided that this isn't really needed at the more moment, and is a
bit "extreme" of a feature anyways (and would need to devise a mechanism
for implementing a multi-way join, ...).
actually, probably in my bytecode it would look something like:
mark
mark; push A; close; call_async
mark; push B; close; call_async
mark; push C; close; call_async
multijoin
(and likely involve adding some logic into the green-thread scheduler...).
ended up basically opting in this case for something simpler which I had
used in the past:
callback events on timers. technically, timed callbacks aren't really
"good", but they work well enough for things like animation tasks, ...
but, I may still need to think about it.
_______________________________________________
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc