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
1fcaacfc
Commit
1fcaacfc
authored
Feb 14, 2023
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix dispose logic of ucast and mcast operators
parent
518aae52
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
libcaf_core/caf/flow/op/mcast.hpp
libcaf_core/caf/flow/op/mcast.hpp
+4
-2
libcaf_core/caf/flow/op/ucast.hpp
libcaf_core/caf/flow/op/ucast.hpp
+6
-4
No files found.
libcaf_core/caf/flow/op/mcast.hpp
View file @
1fcaacfc
...
...
@@ -39,12 +39,14 @@ public:
// -- implementation of subscription -----------------------------------------
bool
disposed
()
const
noexcept
override
{
return
!
state_
;
return
!
state_
||
state_
->
disposed
;
}
void
dispose
()
override
{
if
(
state_
)
{
ctx_
->
delay_fn
([
state
=
std
::
move
(
state_
)]()
{
state
->
do_dispose
();
});
decltype
(
state_
)
state
;
std
::
swap
(
state_
,
state
);
state
->
dispose
();
}
}
...
...
libcaf_core/caf/flow/op/ucast.hpp
View file @
1fcaacfc
...
...
@@ -99,7 +99,7 @@ public:
}
}
void
d
o_d
ispose
()
{
void
dispose
()
{
if
(
out
)
{
out
.
on_complete
();
out
=
nullptr
;
...
...
@@ -135,7 +135,7 @@ public:
else
out
.
on_complete
();
out
=
nullptr
;
d
o_d
ispose
();
dispose
();
}
else
if
(
got_some
&&
when_consumed_some
)
{
ctx
->
delay
(
when_consumed_some
);
}
...
...
@@ -159,12 +159,14 @@ public:
// -- implementation of subscription -----------------------------------------
bool
disposed
()
const
noexcept
override
{
return
!
state_
;
return
!
state_
||
state_
->
disposed
;
}
void
dispose
()
override
{
if
(
state_
)
{
ctx_
->
delay_fn
([
state
=
std
::
move
(
state_
)]()
{
state
->
do_dispose
();
});
decltype
(
state_
)
state
;
std
::
swap
(
state_
,
state
);
state
->
dispose
();
}
}
...
...
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