Changeset 13041 for OpenSceneGraph/trunk/include/OpenThreads/Block
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/OpenThreads/Block (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/OpenThreads/Block
r12138 r13041 23 23 24 24 /** Block is a block that can be used to halt a thread that is waiting another thread to release it.*/ 25 class Block 25 class Block 26 26 { 27 27 public: 28 28 29 29 Block(): 30 30 _released(false) {} … … 76 76 _released = false; 77 77 } 78 78 79 79 inline void set(bool doRelease) 80 80 { … … 98 98 99 99 /** BlockCount is a block that can be used to halt a thread that is waiting for a specified number of operations to be completed.*/ 100 class BlockCount 100 class BlockCount 101 101 { 102 102 public: 103 103 104 104 BlockCount(unsigned int blockCount): 105 105 _blockCount(blockCount), … … 133 133 _cond.wait(&_mut); 134 134 } 135 135 136 136 inline void reset() 137 137 { … … 155 155 156 156 inline void setBlockCount(unsigned int blockCount) { _blockCount = blockCount; } 157 157 158 158 inline unsigned int getBlockCount() const { return _blockCount; } 159 159 160 160 inline unsigned int getCurrentCount() const { return _currentCount; } 161 161 … … 168 168 169 169 private: 170 170 171 171 BlockCount(const BlockCount&) {} 172 172
