Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusspangenberg committed Jan 11, 2024
1 parent c92aafe commit c9a6919
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Marcus Spangenberg
Copyright (c) 2024 Marcus Spangenberg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,26 @@ if (queue.pop(element)) {
// queue is empty
}
// Checks if the queue is empty.
// Returns true if the queue is empty, otherwise false.
// Not thread safe with regards to pop operations, thread safe with regards to push operations. Regarding
// thread safety empty() is considered a pop operation.
if (queue.empty()) {
// queue is empty
}
// Checks if the queue is full.
// Returns true if the queue is full, otherwise false.
// Thread safe with regards to pop operations and to push operations. Regarding thread safety, full() is considered
// a push operation.
if (queue.full()) {
// queue is full
}
```

# License
Expand Down
2 changes: 1 addition & 1 deletion WaitFreeMPSCQueue.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License
Copyright (c) 2023 Marcus Spangenberg
Copyright (c) 2024 Marcus Spangenberg
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit c9a6919

Please sign in to comment.