Thread safe queue like collection
Hi, Do Pharo 2 have some sort of queue like collection, where different threads (coming mostly from a Multithread Zinc Server) can push objects into it safely, while a service on the other end can consume the queue? Regards, Esteban A. Maringolo
SharedQueue ? On 13 Nov 2013, at 19:16, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
Hi,
Do Pharo 2 have some sort of queue like collection, where different threads (coming mostly from a Multithread Zinc Server) can push objects into it safely, while a service on the other end can consume the queue?
Regards,
Esteban A. Maringolo
I guess SharedQueue will do it, have you (or anybody) tested it in the context of real multi threaded use? It is too soon for me to think of a real MQ (with STOMP). Regards! Esteban A. Maringolo 2013/11/13 Sven Van Caekenberghe <sven@stfx.eu>
SharedQueue ?
On 13 Nov 2013, at 19:16, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
Hi,
Do Pharo 2 have some sort of queue like collection, where different threads (coming mostly from a Multithread Zinc Server) can push objects into it safely, while a service on the other end can consume the queue?
Regards,
Esteban A. Maringolo
Yes, I have used it, even extended it. It looks thread safe, so it should be enough to get started. On 13 Nov 2013, at 20:08, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
I guess SharedQueue will do it, have you (or anybody) tested it in the context of real multi threaded use?
It is too soon for me to think of a real MQ (with STOMP).
Regards!
Esteban A. Maringolo
2013/11/13 Sven Van Caekenberghe <sven@stfx.eu> SharedQueue ?
On 13 Nov 2013, at 19:16, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
Hi,
Do Pharo 2 have some sort of queue like collection, where different threads (coming mostly from a Multithread Zinc Server) can push objects into it safely, while a service on the other end can consume the queue?
Regards,
Esteban A. Maringolo
On 11/13/2013 08:30 PM, Sven Van Caekenberghe wrote:
Yes, I have used it, even extended it. It looks thread safe, so it should be enough to get started.
If you are after something that is more like an in memory SocketStream then you have the SharedStreams package which I wrote a long time ago, it is actually pretty cool: http://map.squeak.org/packagebyname/sharedstreams I recall that we did find several "holes" in SharedQueue at the time. SharedStreams also use more fitting prims for characters/bytes. regards, Göran
AtomicQueue On Nov 13, 2013, at 7:16 PM, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
Hi,
Do Pharo 2 have some sort of queue like collection, where different threads (coming mostly from a Multithread Zinc Server) can push objects into it safely, while a service on the other end can consume the queue?
Regards,
Esteban A. Maringolo
participants (4)
-
Esteban A. Maringolo -
Göran Krampe -
Stéphane Ducasse -
Sven Van Caekenberghe