From 3666a49022f84b3d1888f630a78f3f8f28aadde1 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 29 Aug 2009 10:32:21 +0200 Subject: bug in identifying current thread fixed --- src/app_thread.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/app_thread.hpp') diff --git a/src/app_thread.hpp b/src/app_thread.hpp index e45b1b2..0f95de9 100644 --- a/src/app_thread.hpp +++ b/src/app_thread.hpp @@ -25,6 +25,7 @@ #include "stdint.hpp" #include "object.hpp" #include "ypollset.hpp" +#include "thread.hpp" namespace zmq { @@ -69,10 +70,12 @@ namespace zmq typedef std::vector sockets_t; sockets_t sockets; + // If false, app_thread_t object is not associated with any OS thread. + // In such case, 'tid' member contains a bogus value. + bool associated; + // Thread ID associated with this slot. - // TODO: Virtualise pid_t! - // TODO: Check whether getpid returns unique ID for each thread. - int tid; + thread_t::id_t tid; // App thread's signaler object. ypollset_t pollset; -- cgit v1.2.3