summaryrefslogtreecommitdiff
path: root/src/thread.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.hpp')
-rw-r--r--src/thread.hpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/thread.hpp b/src/thread.hpp
index 432770c..f3f5f8d 100644
--- a/src/thread.hpp
+++ b/src/thread.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU General Public License as published by
+ the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -55,30 +56,21 @@ namespace zmq
// Waits for thread termination.
void stop ();
-#ifdef ZMQ_HAVE_WINDOWS
- typedef DWORD id_t;
-#else
- typedef pthread_t id_t;
-#endif
-
- static id_t id ();
- static bool equal (id_t id1_, id_t id2_);
+ // These are internal members. They should be private, however then
+ // they would not be accessible from the main C routine of the thread.
+ thread_fn *tfn;
+ void *arg;
private:
#ifdef ZMQ_HAVE_WINDOWS
- static unsigned int __stdcall thread_routine (void *arg_);
HANDLE descriptor;
#else
- static void *thread_routine (void *arg_);
pthread_t descriptor;
#endif
- thread_fn *tfn;
- void *arg;
-
thread_t (const thread_t&);
- void operator = (const thread_t&);
+ const thread_t &operator = (const thread_t&);
};
}