[chuck] returning values when sporking

Matthew Shanley matthewshanley at littlesecretsrecords.com
Thu Apr 21 21:57:22 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I'm new to the practice of forking, and experimenting with it (well
sporking) in chuck. I'm making a call along the lines of:

spork ~ sporkFun(arguments) => int value;

to a function:

fun int sporkFun(arguments) {returs something in here}

As I'm sure most of you know quite well, value doesn't get the return
value from the function called by the spork, but rather the shred ID.
That makes sense just fine and I can see lots of value in that. What I'm
wondering is if there's a way for the child shred to return values to
the parent, or as a wider question, for them to communicate in any way.
I've figured out that global variables can be accessed both by parent
and child, so I guess using those as flags is one way to go. Any other
ideas? I think this should all be clear, but I can post code if that
would help.


eagerly awaiting arrays, but not envying the work by ge and the rest to
bring them to us,

matt

- --
Matthew Shanley
little secrets records and stuff
http://littlesecretsrecords.com/
E-mail: matthewshanley at littlesecretsrecords.com

GnuPG Public Key ID: 0x4DA4915C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCaFoCIrtD7k2kkVwRAiW8AJ4n132UMPJeBpbdWRrQOCMw8aximwCdHOad
NvpXub41Ucpwe58txsTWIso=
=gutB
-----END PGP SIGNATURE-----


More information about the chuck mailing list