aboutsummaryrefslogtreecommitdiff
path: root/src/thread.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-10-06 03:25:22 +0000
committerMike Buland <eichlan@xagasoft.com>2011-10-06 03:25:22 +0000
commit208b983734d7431699f4bd3534e08321e42ada86 (patch)
treea6865f0db36e9c3b8dd13b9ed4d10d282f0f7cbf /src/thread.h
parent1358cb4c7325e01c13533ca402cccc28575cdf14 (diff)
downloadlibbu++-208b983734d7431699f4bd3534e08321e42ada86.tar.gz
libbu++-208b983734d7431699f4bd3534e08321e42ada86.tar.bz2
libbu++-208b983734d7431699f4bd3534e08321e42ada86.tar.xz
libbu++-208b983734d7431699f4bd3534e08321e42ada86.zip
Renamed most of the core threading system, some ancillary systems need some
kind of prefix or something, we could stick with Ito, I will until I think of something else.
Diffstat (limited to '')
-rw-r--r--src/thread.h (renamed from src/ito.h)24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ito.h b/src/thread.h
index 9f50b2a..70e6f5f 100644
--- a/src/ito.h
+++ b/src/thread.h
@@ -5,8 +5,8 @@
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
6 */ 6 */
7 7
8#ifndef BU_ITO_H 8#ifndef BU_THREAD_H
9#define BU_ITO_H 9#define BU_THREAD_H
10 10
11#include <pthread.h> 11#include <pthread.h>
12 12
@@ -19,18 +19,18 @@ namespace Bu
19 * run in it's own thread, one per class instance. 19 * run in it's own thread, one per class instance.
20 *@ingroup Threading 20 *@ingroup Threading
21 */ 21 */
22 class Ito 22 class Thread
23 { 23 {
24 public: 24 public:
25 /** 25 /**
26 * Construct an Ito thread. 26 * Construct an Thread thread.
27 */ 27 */
28 Ito(); 28 Thread();
29 29
30 /** 30 /**
31 * Destroy an Ito thread. 31 * Destroy an Thread thread.
32 */ 32 */
33 virtual ~Ito(); 33 virtual ~Thread();
34 34
35 /** 35 /**
36 * Begin thread execution. This will call the overridden run function, 36 * Begin thread execution. This will call the overridden run function,
@@ -38,7 +38,7 @@ namespace Bu
38 * exits, the thread is killed, or the thread is cancelled (optionally). 38 * exits, the thread is killed, or the thread is cancelled (optionally).
39 * The thread started in this manner has access to all of it's class 39 * The thread started in this manner has access to all of it's class
40 * variables, but be sure to protect possible multiple-access with 40 * variables, but be sure to protect possible multiple-access with
41 * ItoMutex objects. 41 * ThreadMutex objects.
42 * @returns True if starting the thread was successful. False if 42 * @returns True if starting the thread was successful. False if
43 * something went wrong and the thread has not started. 43 * something went wrong and the thread has not started.
44 */ 44 */
@@ -63,7 +63,7 @@ namespace Bu
63 /** 63 /**
64 * Join the thread in action. This function performs what is commonly 64 * Join the thread in action. This function performs what is commonly
65 * called a thread join. That is that it effectively makes the calling 65 * called a thread join. That is that it effectively makes the calling
66 * thread an the Ito thread contained in the called object one in the 66 * thread an the Thread thread contained in the called object one in the
67 * same, and pauses the calling thread until the called thread exits. 67 * same, and pauses the calling thread until the called thread exits.
68 * That is, when called from, say, your main(), mythread.join() will 68 * That is, when called from, say, your main(), mythread.join() will
69 * not return until the thread mythread has exited. This is very handy 69 * not return until the thread mythread has exited. This is very handy
@@ -79,10 +79,10 @@ namespace Bu
79 79
80 protected: 80 protected:
81 /** 81 /**
82 * The workhorse of the Ito class. This is the function that will run 82 * The workhorse of the Thread class. This is the function that will run
83 * in the thread, when this function exits the thread dies and is 83 * in the thread, when this function exits the thread dies and is
84 * cleaned up by the system. Make sure to read up on ItoMutex, 84 * cleaned up by the system. Make sure to read up on ThreadMutex,
85 * ItoCondition, and cancel to see how to control and protect 85 * ThreadCondition, and cancel to see how to control and protect
86 * everything you do in a safe way within this function. 86 * everything you do in a safe way within this function.
87 *@returns I'm not sure right now, but this is the posix standard form. 87 *@returns I'm not sure right now, but this is the posix standard form.
88 */ 88 */