diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2010-04-27 17:07:55 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2010-04-27 17:07:55 +0000 |
| commit | 1889b55dcbb3f5c5cccc3bcd986b13d0d108ed6c (patch) | |
| tree | 3ea239424e33edfc8d9b80aa6b923d944cd0bfa1 /src/ito.h | |
| parent | 801e7de1f85656746d832508baf4583907826420 (diff) | |
| download | libbu++-1889b55dcbb3f5c5cccc3bcd986b13d0d108ed6c.tar.gz libbu++-1889b55dcbb3f5c5cccc3bcd986b13d0d108ed6c.tar.bz2 libbu++-1889b55dcbb3f5c5cccc3bcd986b13d0d108ed6c.tar.xz libbu++-1889b55dcbb3f5c5cccc3bcd986b13d0d108ed6c.zip | |
The Bu::Ito thread class has changed the rules on the run function. It no
longer returns anything, that's fine, it's in a class, but it also is protected
now. That doesn't really effect child classes much, they can make run public,
but I reccomend protected to avoid confusion.
Diffstat (limited to 'src/ito.h')
| -rw-r--r-- | src/ito.h | 20 |
1 files changed, 10 insertions, 10 deletions
| @@ -61,16 +61,6 @@ namespace Bu | |||
| 61 | bool stop(); | 61 | bool stop(); |
| 62 | 62 | ||
| 63 | /** | 63 | /** |
| 64 | * The workhorse of the Ito class. This is the function that will run | ||
| 65 | * in the thread, when this function exits the thread dies and is | ||
| 66 | * cleaned up by the system. Make sure to read up on ItoMutex, | ||
| 67 | * ItoCondition, and cancel to see how to control and protect | ||
| 68 | * everything you do in a safe way within this function. | ||
| 69 | *@returns I'm not sure right now, but this is the posix standard form. | ||
| 70 | */ | ||
| 71 | virtual void *run()=0; | ||
| 72 | |||
| 73 | /** | ||
| 74 | * Join the thread in action. This function performs what is commonly | 64 | * Join the thread in action. This function performs what is commonly |
| 75 | * 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 |
| 76 | * thread an the Ito thread contained in the called object one in the | 66 | * thread an the Ito thread contained in the called object one in the |
| @@ -89,6 +79,16 @@ namespace Bu | |||
| 89 | 79 | ||
| 90 | protected: | 80 | protected: |
| 91 | /** | 81 | /** |
| 82 | * The workhorse of the Ito class. This is the function that will run | ||
| 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, | ||
| 85 | * ItoCondition, and cancel to see how to control and protect | ||
| 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. | ||
| 88 | */ | ||
| 89 | virtual void run()=0; | ||
| 90 | |||
| 91 | /** | ||
| 92 | * This is the hidden-heard of the thread system. While run is what the | 92 | * This is the hidden-heard of the thread system. While run is what the |
| 93 | * user gets to override, and everything said about it is true, this is | 93 | * user gets to override, and everything said about it is true, this is |
| 94 | * the function that actually makes up the thread, it simply calls the | 94 | * the function that actually makes up the thread, it simply calls the |
