-
Notifications
You must be signed in to change notification settings - Fork 67
/
README
39 lines (32 loc) · 1.25 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Queue
- thread-safe
- ability to define max number of elements
- sort elements into queue
- get in O(1), except when filtered (worst case O(n))
- put in O(1) when unsorted, in O(n) in the worst case when sorted
- MIT license (windows support relies on LGPL licensed pthreads-win32 (http://sourceware.org/pthreads-win32/))
sorted queue:
your elements in the queue will be ordered according to the sort function which is given.
Build steps:
- mkdir build && cd build
- cmake ..
- make / build VS project under windows
Building 32-/64-bit:
- OS X: universal binaries are built
- Linux: use 'cmake -DBUILT_32=ON ..' to force 32-bit built, -DBUILT_64=ON for 64-bit
- Windows: use 'cmake -G "Visual Studio 11 Win64" -DBUILT_64=ON ..' to force a 64-bit build, 'cmake -G "Visual Studio 11" -DBUILT_32=ON ..' for 32-bit
TODO:
- proper test suite, so that everybody can easily see whats tested and run the tests himself
- ability to turn of element counting => only unlimited queue
- function to peek at next element
error codes:
< 0 => error
= 0 => okay
0 - everything alright
-1 - invalid queue
-2 - could not acquire lock
-3 - could not allocate memory
-4 - no new data allowed
-5 - invalid element in queue
-6 - invalid callback
-7 - max_elements reached or no elements in queue