diff options
Diffstat (limited to '')
-rw-r--r-- | src/thread.h (renamed from src/ito.h) | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -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 | */ |