On Thursday, January 21, 2016 at 12:50:26 PM UTC-5, antoine wrote:
> Bonjour,
> 
> Maybe for avoiding transforming mutable data to immutable data you could use
> make-shared-bytes and transfer the data by this mean? Don't know the 
> underlying
> implementation of make-shared-bytes it didn't seem to use POSIX shared memory
> objects.
> 
> Use one make-shared-bytes per place and synchronise between master place and a
> child with the normal chanel communication.

But you would still need to copy the mutable byte string (returned by various 
byte string functions) to the shared byte string you create with 
make-shared-bytes, right? So, a byte string would still be copied.

As someone suggested earlier, I could use read-bytes! and read directly into a 
byte string created by make-shared-bytes. Then I *think* the cost to "send" it 
to the worker place is minimal (maybe just sending a pointer). That would 
require some buffer bookkeeping to split lines, etc., but the workers would 
still need to copy their resulting byte strings to the output place.

Maybe I'm being overprotective, but my hunch is that I need the output place to 
serialize access to the output file vs. having the worker places write directly 
to it, but if Racket serializes access to the output port, maybe I can skip 
that.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to