On 06/08/2015 08:10 PM, MinRK wrote:
On Mon, Jun 8, 2015 at 11:00 AM, Arnaud Loonstra arn...@sphaero.org
mailto:arn...@sphaero.org wrote:
A python dictionary is not thread safe, AFAIK. So if multiple
producers(threads) write to the dictionary you'll run into trouble.
Depends what
On Mon, Jun 8, 2015 at 11:00 AM, Arnaud Loonstra arn...@sphaero.org wrote:
A python dictionary is not thread safe, AFAIK. So if multiple
producers(threads) write to the dictionary you'll run into trouble.
Depends what you mean. All of Python is threadsafe, thanks to the GIL.
Since object IDs
A python dictionary is not thread safe, AFAIK. So if multiple
producers(threads) write to the dictionary you'll run into trouble.
Rg,
Arnaud
On June 8, 2015 6:05:08 PM GMT+02:00, Min RK benjami...@gmail.com wrote:
On Jun 8, 2015, at 01:35, Arnaud Loonstra arn...@sphaero.org wrote:
On
On 06/06/2015 01:52 AM, MinRK wrote:
Without using ctypes, you could pass the objects through a namespace:
|# shared namespace
ns = {}
# sender
ns[id(obj)] = obj
pipe_out.send(struct.pack(b'Q',1))
# receiver
id_bytes = pipe_in.recv()
obj_id = struct.unpack(b'Q', id_bytes)[0]
obj =
On Jun 8, 2015, at 01:35, Arnaud Loonstra arn...@sphaero.org wrote:
On 06/06/2015 01:52 AM, MinRK wrote:
Without using ctypes, you could pass the objects through a namespace:
|# shared namespace
ns = {}
# sender
ns[id(obj)] = obj
pipe_out.send(struct.pack(b'Q',1))
# receiver
Without using ctypes, you could pass the objects through a namespace:
# shared namespace
ns = {}
# sender
ns[id(obj)] = obj
pipe_out.send(struct.pack(b'Q', 1))
# receiver
id_bytes = pipe_in.recv()
obj_id = struct.unpack(b'Q', id_bytes)[0]
obj = ns.pop(obj_id)
The ctypes cast approach doesn’t
On 2015-06-03 17:25, Arnaud Loonstra wrote:
On 2015-06-03 10:20, Arnaud Loonstra wrote:
I read here: http://zeromq.github.io/pyzmq/serialization.html PyZMQ
being able to pass an object without copying it.
I guess this holds only for the serialised copy of the data..? In
theory the object can
I read here: http://zeromq.github.io/pyzmq/serialization.html PyZMQ
being able to pass an object without copying it.
I guess this holds only for the serialised copy of the data..? In
theory the object can be passed as a reference thus preventing a copy.
Suppose I have an image as a python
On 2015-06-03 10:20, Arnaud Loonstra wrote:
I read here: http://zeromq.github.io/pyzmq/serialization.html PyZMQ
being able to pass an object without copying it.
I guess this holds only for the serialised copy of the data..? In
theory the object can be passed as a reference thus preventing a