forked from tobithiel/Queue
-
Notifications
You must be signed in to change notification settings - Fork 0
A small thread-safe queue written in C
License
MatthewEdge/Queue
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 sorted queue: your elements in the queue will be ordered according to the sort function which is given. compilation OS X: dylib: gcc -dynamiclib -Wall -Wextra -Wno-unused-parameter -lpthread -o libqueue.dylib queue.c queue_internal.c example: gcc -Wall -Wextra -Wno-unused-parameter -lpthread -o example queue.c queue_internal.c example.c compilation Linux: example: gcc -Wall -Wextra -Wno-unused-parameter -lpthread -o example queue.c queue_internal.c example.c TODO: - proper test suite, so that everybody can easily see whats tested and run the tests himself - Windows support - dynamically create type-safe put/get methods with macros - ability to turn of element counting => only unlimited queue - 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
About
A small thread-safe queue written in C
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published