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
36a7a16f
Commit
36a7a16f
authored
Jan 05, 2022
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix implementation on observe_on
parent
155f7bda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
libcaf_core/caf/flow/observable.hpp
libcaf_core/caf/flow/observable.hpp
+5
-8
No files found.
libcaf_core/caf/flow/observable.hpp
View file @
36a7a16f
...
...
@@ -1677,14 +1677,11 @@ observable<T> observable<T>::observe_on(coordinator* other, size_t buffer_size,
size_t
min_request_size
)
{
using
buffer_type
=
async
::
spsc_buffer
<
T
>
;
auto
buf
=
make_counted
<
buffer_type
>
(
buffer_size
,
min_request_size
);
auto
up
=
make_counted
<
buffer_writer_impl
<
buffer_type
>>
(
pimpl_
->
ctx
(),
buf
);
auto
down
=
make_counted
<
observable_buffer_impl
<
buffer_type
>>
(
other
,
buf
);
buf
->
set_producer
(
up
);
buf
->
set_consumer
(
down
);
subscribe
(
up
->
as_observer
());
auto
hdl
=
observable
<
T
>
{
std
::
move
(
down
)};
pimpl_
->
ctx
()
->
watch
(
hdl
.
as_disposable
());
return
hdl
;
subscribe
(
async
::
producer_resource
<
T
>
{
buf
});
auto
adapter
=
make_counted
<
observable_buffer_impl
<
buffer_type
>>
(
other
,
buf
);
buf
->
set_consumer
(
adapter
);
other
->
watch
(
adapter
->
as_disposable
());
return
observable
<
T
>
{
std
::
move
(
adapter
)};
}
// -- observable::subscribe ----------------------------------------------------
...
...
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