process_send(p, obj)
Send the object obj
to the process p
. Return void
.
A process can send and receive numbers, symbols, strings, pairs and arrays. More complex objects like functions should be explicitly serialized and de-serialized. The functions object_to_u8array and u8array_to_object should be used for this.
let p = process(^(cp) showln("server says: ", process_receive(cp)))
process_send(p, "hello")
//> server says: hello
process_close(p)