summaryrefslogtreecommitdiff
path: root/src/ctx.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-11-05 16:38:52 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-11-05 16:38:52 +0100
commit9cfdb441f45057c7106a101835d65164fce9470a (patch)
tree20b7db26b4f27b726d15ec80aa24333f1c02d729 /src/ctx.cpp
parent623a9c9f1b53bdda9ad61f58cdc7a286e3e474cd (diff)
slots renamed to tids
Threads were so far identified by integers called 'slots'. This patch renames them to more comprehensible 'tid's (thread IDs). Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/ctx.cpp')
-rw-r--r--src/ctx.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp
index ff7c68c..b4c27fd 100644
--- a/src/ctx.cpp
+++ b/src/ctx.cpp
@@ -92,7 +92,7 @@ zmq::ctx_t::~ctx_t ()
for (io_threads_t::size_type i = 0; i != io_threads.size (); i++)
delete io_threads [i];
- // Deallocate the array of slot. No special work is
+ // Deallocate the array of slots. No special work is
// needed as signalers themselves were deallocated with their
// corresponding io_thread/socket objects.
free (slots);
@@ -216,9 +216,9 @@ void zmq::ctx_t::zombify_socket (socket_base_t *socket_)
slot_sync.unlock ();
}
-void zmq::ctx_t::send_command (uint32_t slot_, const command_t &command_)
+void zmq::ctx_t::send_command (uint32_t tid_, const command_t &command_)
{
- slots [slot_]->send (command_);
+ slots [tid_]->send (command_);
}
zmq::io_thread_t *zmq::ctx_t::choose_io_thread (uint64_t affinity_)
@@ -314,7 +314,7 @@ void zmq::ctx_t::dezombify ()
// Try to dezombify each zombie in the list. Note that caller is
// responsible for calling this method in the slot_sync critical section.
for (zombies_t::iterator it = zombies.begin (); it != zombies.end ();) {
- uint32_t slot = (*it)->get_slot ();
+ uint32_t tid = (*it)->get_tid ();
if ((*it)->dezombify ()) {
#if defined _MSC_VER
@@ -323,8 +323,8 @@ void zmq::ctx_t::dezombify ()
#else
zombies.erase (it);
#endif
- empty_slots.push_back (slot);
- slots [slot] = NULL;
+ empty_slots.push_back (tid);
+ slots [tid] = NULL;
}
else
it++;