![](https://secure.gravatar.com/avatar/8a1ca9f288a1644e9e07d7f11d2f494c.jpg?s=120&d=mm&r=g)
Yeah, that's what I figured. It's okay, it was actually a dumb idea
anyway. I'm creating micro-structures of wavelet grains by sporking a
function that sequences the sporking of functions that run the
wavelets. Both functions need to advance time and must be sporked (so
they can be simultaneous). i wanted them to return a duration equal
to the length that they ran. But if i do my job right i will either
a) know ahead of time or, b) not care.
Thanks!
;-)
-mike
On Fri, Jun 6, 2008 at 2:34 AM, Kassen
2008/6/6 mike clemow
: Hello list,
Hey, mike!
Couldn't find this one in the manual. Where do sporked funcitons return to? How do I get the return value of a spoked function?
they don't and you won't, I fear..... (or shred-heaven, depending on your persuasion)
Normal functions run inside of a shred and can return a value for the rest of the shred to work with. Sporked functions, on the other hand, run paralel to the sporking shred, in their own shred. As the originating shred doesn't wait for them to finish it makes no sense for them to return anything. Because of this you can only spork functions of return-type "void".
You can still, BTW, advance time within a normal function if you'd like. On the other hand; you don't need to advance time in sporked functions as such, it's just that sporking only makes sense if you also advance time in that function/shred.
Because of this I'm not really sure what you need return values from sporked functions for but if your sporked functions need to comunicate to the other shreds on what they've done events may suit your needs?
Hope that clarifies. Yours, Kas.
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users