From bbaa494fb569d94c356ddecca7dbf249ffc217cf Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 7 Feb 2010 09:14:43 +0100 Subject: ZMQII-59: TCP server crashes sometimes when message is send and socket is closed immediately --- src/dispatcher.hpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/dispatcher.hpp') diff --git a/src/dispatcher.hpp b/src/dispatcher.hpp index 799e65b..2c11c57 100644 --- a/src/dispatcher.hpp +++ b/src/dispatcher.hpp @@ -70,23 +70,11 @@ namespace zmq int thread_slot_count (); // Send command from the source to the destination. - inline void write (int source_, int destination_, - const command_t &command_) - { - command_pipe_t &pipe = - command_pipes [source_ * signalers.size () + destination_]; - pipe.write (command_); - if (!pipe.flush ()) - signalers [destination_]->signal (source_); - } + void write (int source_, int destination_, const command_t &command_); // Receive command from the source. Returns false if there is no // command available. - inline bool read (int source_, int destination_, command_t *command_) - { - return command_pipes [source_ * signalers.size () + - destination_].read (command_); - } + bool read (int source_, int destination_, command_t *command_); // Returns the I/O thread that is the least busy at the moment. // Taskset specifies which I/O threads are eligible (0 = all). -- cgit v1.2.3