summaryrefslogtreecommitdiff
path: root/src/dispatcher.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-02-07 09:14:43 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-02-07 09:14:43 +0100
commitbbaa494fb569d94c356ddecca7dbf249ffc217cf (patch)
tree84a6f06b8db50c0d09066c3fdd20507e4f8b780f /src/dispatcher.hpp
parentd21bf21a362cf6d20d8d060bb91ee2fdca1dd88b (diff)
ZMQII-59: TCP server crashes sometimes when message is send and socket is closed immediately
Diffstat (limited to 'src/dispatcher.hpp')
-rw-r--r--src/dispatcher.hpp16
1 files changed, 2 insertions, 14 deletions
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).