Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
ab2a2752
Commit
ab2a2752
authored
Sep 24, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more requirements
parent
5ec54456
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
libcaf_core/caf/detail/single_reader_queue.hpp
libcaf_core/caf/detail/single_reader_queue.hpp
+4
-0
No files found.
libcaf_core/caf/detail/single_reader_queue.hpp
View file @
ab2a2752
...
@@ -268,11 +268,15 @@ class single_reader_queue {
...
@@ -268,11 +268,15 @@ class single_reader_queue {
pointer
e
=
m_stack
.
load
();
pointer
e
=
m_stack
.
load
();
// must not be called on a closed queue
// must not be called on a closed queue
CAF_REQUIRE
(
e
!=
nullptr
);
CAF_REQUIRE
(
e
!=
nullptr
);
// fetching data while blocked is an error
CAF_REQUIRE
(
e
!=
reader_blocked_dummy
());
// it's enough to check this once, since only the owner is allowed
// it's enough to check this once, since only the owner is allowed
// to close the queue and only the owner is allowed to call this
// to close the queue and only the owner is allowed to call this
// member function
// member function
while
(
e
!=
end_ptr
)
{
while
(
e
!=
end_ptr
)
{
if
(
m_stack
.
compare_exchange_weak
(
e
,
end_ptr
))
{
if
(
m_stack
.
compare_exchange_weak
(
e
,
end_ptr
))
{
// fetching data while blocked is an error
CAF_REQUIRE
(
e
!=
reader_blocked_dummy
());
if
(
is_dummy
(
e
))
{
if
(
is_dummy
(
e
))
{
// only use-case for this is closing a queue
// only use-case for this is closing a queue
CAF_REQUIRE
(
end_ptr
==
nullptr
);
CAF_REQUIRE
(
end_ptr
==
nullptr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment