diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-10-23 07:43:50 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-10-23 07:43:50 +0000 |
commit | da1e0ef0772b078bd295301bd675afdee00d40e9 (patch) | |
tree | 7d1703bbb5c2d76e6e6300e51f0ed1e09704af4f /src/synchroqueue.h | |
parent | 208b983734d7431699f4bd3534e08321e42ada86 (diff) | |
download | libbu++-da1e0ef0772b078bd295301bd675afdee00d40e9.tar.gz libbu++-da1e0ef0772b078bd295301bd675afdee00d40e9.tar.bz2 libbu++-da1e0ef0772b078bd295301bd675afdee00d40e9.tar.xz libbu++-da1e0ef0772b078bd295301bd675afdee00d40e9.zip |
Switched ito* to synchro*, except the server, I'm thinking of takeing the core
in a different direction anyway.
Added the Deflate class, it uses zlib, and can do raw (headerless) deflate
streams, zlib format, or gzip format. It's easy to use and quite versitile.
Diffstat (limited to '')
-rw-r--r-- | src/synchroqueue.h (renamed from src/itoqueue.h) | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/itoqueue.h b/src/synchroqueue.h index 039e09c..79d5e49 100644 --- a/src/itoqueue.h +++ b/src/synchroqueue.h | |||
@@ -5,19 +5,19 @@ | |||
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_QUEUE_H | 8 | #ifndef BU_SYNCHRO_QUEUE_H |
9 | #define BU_ITO_QUEUE_H | 9 | #define BU_SYNCHRO_QUEUE_H |
10 | 10 | ||
11 | #include <pthread.h> | 11 | #include <pthread.h> |
12 | 12 | ||
13 | #include "mutex.h" | 13 | #include "bu/mutex.h" |
14 | #include "condition.h" | 14 | #include "bu/condition.h" |
15 | 15 | ||
16 | namespace Bu | 16 | namespace Bu |
17 | { | 17 | { |
18 | /** | 18 | /** |
19 | * A thread-safe queue class. This class is a very simple queue with some | 19 | * A thread-safe queue class. This class is a very simple queue with some |
20 | * cool extra functionality for use with the Ito system. The main extra | 20 | * cool extra functionality for use with the Synchro system. The main extra |
21 | * that it provides is the option to either dequeue without blocking, with | 21 | * that it provides is the option to either dequeue without blocking, with |
22 | * infinite blocking, or with timed blocking, which will return a value if | 22 | * infinite blocking, or with timed blocking, which will return a value if |
23 | * something is enqueued within the specified time limit, or NULL if the | 23 | * something is enqueued within the specified time limit, or NULL if the |
@@ -25,7 +25,7 @@ namespace Bu | |||
25 | *@ingroup Threading Containers | 25 | *@ingroup Threading Containers |
26 | */ | 26 | */ |
27 | template <class T> | 27 | template <class T> |
28 | class ItoQueue | 28 | class SynchroQueue |
29 | { | 29 | { |
30 | private: | 30 | private: |
31 | /** | 31 | /** |
@@ -41,7 +41,7 @@ namespace Bu | |||
41 | /** | 41 | /** |
42 | * Construct an empty queue. | 42 | * Construct an empty queue. |
43 | */ | 43 | */ |
44 | ItoQueue() : | 44 | SynchroQueue() : |
45 | pStart( NULL ), | 45 | pStart( NULL ), |
46 | pEnd( NULL ), | 46 | pEnd( NULL ), |
47 | nSize( 0 ) | 47 | nSize( 0 ) |
@@ -54,7 +54,7 @@ namespace Bu | |||
54 | * pointers without cleaning up the memory they pointed to. Make sure | 54 | * pointers without cleaning up the memory they pointed to. Make sure |
55 | * you're queue is empty before allowing it to be destroyed! | 55 | * you're queue is empty before allowing it to be destroyed! |
56 | */ | 56 | */ |
57 | ~ItoQueue() | 57 | ~SynchroQueue() |
58 | { | 58 | { |
59 | Item *pCur = pStart; | 59 | Item *pCur = pStart; |
60 | while( pCur ) | 60 | while( pCur ) |