Charles R Harris wrote:
>
>     I'll pitch in a few donuts (and my eternal gratitude) for an
>     example of
>     shared memory use using numpy arrays that is cross platform, or at
>     least
>     works in linux, mac, and windows.
>
>
> I wonder if you could mmap a file and use it as common memory?
Yes, that's the basic idea. Now for the example that works on those
platforms...
> Forking in python under linux leads to copies because anything that
> accesses an object changes its reference count.
I'm not sure what you're trying to say here. If it's shared memory, it's
not copied -- that's the whole point. I don't really care how I spawn
the multiple processes, and indeed forking is one way.
> Pipes are easy and could be used for synchronization.
True. But they're not going to be very fast. (I'd like to send streams
of realtime images between different processes.)
> Would python threading work for you?
That's what I use now and what I'd like to get away from because 1) the
GIL sucks and 2) (bug-free) threading is hard.

-Andrew
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to