Hey folks,

Has anyone invented a successful way of using coroutines like lambas? I want 
the initial invocation of the coroutine to be able to receive parameters. All 
I can think of is using some cooperative globals and a layering function 
inside the function invoking the lamba-like coroutine

global A

procedure invoker(cr, args[])
    A := args
    suspend @cr
end


procedure worker(arg1, arg2, cr, curry[])
    .....
    col := "abc"
    .....
    invoker(cr, curry ||| [col])
    .....
end

procedure master()
    local hash
    hash := table()
    .....
    worker(x, y, [\hash(A[1])])
    ....
end

[assuming I've done that correctly off the top of my head]



------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to