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
a65ae292
Commit
a65ae292
authored
Aug 08, 2023
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CI findings on Linux and Windows
parent
863b23dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
libcaf_test/caf/test/fixture/deterministic.cpp
libcaf_test/caf/test/fixture/deterministic.cpp
+14
-1
libcaf_test/caf/test/fixture/deterministic.hpp
libcaf_test/caf/test/fixture/deterministic.hpp
+1
-1
libcaf_test/caf/test/fixture/deterministic.test.cpp
libcaf_test/caf/test/fixture/deterministic.test.cpp
+0
-6
No files found.
libcaf_test/caf/test/fixture/deterministic.cpp
View file @
a65ae292
...
@@ -213,7 +213,20 @@ deterministic::deterministic() : cfg(this), sys(cfg) {
...
@@ -213,7 +213,20 @@ deterministic::deterministic() : cfg(this), sys(cfg) {
}
}
deterministic
::~
deterministic
()
{
deterministic
::~
deterministic
()
{
events_
.
clear
();
// Note: we need clean up all remaining messages manually. This in turn may
// clean up actors as unreachable if the test did not consume all
// messages. Otherwise, the destructor of `sys` will wait for all
// actors, potentially waiting forever. However, we cannot just call
// `events_.clear()`, because that would potentially cause an actor to
// become unreachable and close its mailbox. This would call
// `pop_msg_impl` in turn, which then tries to alter the list while
// we're clearing it.
while
(
!
events_
.
empty
())
{
std
::
list
<
std
::
unique_ptr
<
scheduling_event
>>
tmp
;
tmp
.
splice
(
tmp
.
end
(),
events_
);
// Here, tmp will be destroyed and cleanup code of actors might send more
// messages. Hence the loop.
}
}
}
bool
deterministic
::
prepone_event_impl
(
const
strong_actor_ptr
&
receiver
)
{
bool
deterministic
::
prepone_event_impl
(
const
strong_actor_ptr
&
receiver
)
{
...
...
libcaf_test/caf/test/fixture/deterministic.hpp
View file @
a65ae292
...
@@ -145,7 +145,7 @@ private:
...
@@ -145,7 +145,7 @@ private:
private:
private:
template
<
size_t
...
Is
>
template
<
size_t
...
Is
>
bool
do_check
(
const_typed_message_view
<
Ts
...
>
view
,
//
bool
do_check
(
[[
maybe_unused
]]
const_typed_message_view
<
Ts
...
>
view
,
//
std
::
index_sequence
<
Is
...
>
)
{
std
::
index_sequence
<
Is
...
>
)
{
return
(((
std
::
get
<
Is
>
(
*
predicates_
))(
get
<
Is
>
(
view
)))
&&
...);
return
(((
std
::
get
<
Is
>
(
*
predicates_
))(
get
<
Is
>
(
view
)))
&&
...);
}
}
...
...
libcaf_test/caf/test/fixture/deterministic.test.cpp
View file @
a65ae292
...
@@ -13,12 +13,6 @@
...
@@ -13,12 +13,6 @@
namespace
fixture
=
caf
::
test
::
fixture
;
namespace
fixture
=
caf
::
test
::
fixture
;
template
<
class
T
>
using
value_predicate
=
fixture
::
deterministic
::
value_predicate
<
T
>
;
template
<
class
...
Ts
>
using
message_predicate
=
fixture
::
deterministic
::
message_predicate
<
Ts
...
>
;
struct
my_int
{
struct
my_int
{
int
value
;
int
value
;
};
};
...
...
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