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
ca84509a
Commit
ca84509a
authored
Dec 03, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add system paramater to middleman hooks
parent
c72835f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
libcaf_io/caf/io/middleman.hpp
libcaf_io/caf/io/middleman.hpp
+2
-2
libcaf_io/src/middleman.cpp
libcaf_io/src/middleman.cpp
+3
-2
No files found.
libcaf_io/caf/io/middleman.hpp
View file @
ca84509a
...
@@ -154,7 +154,7 @@ public:
...
@@ -154,7 +154,7 @@ public:
template
<
class
C
,
typename
...
Ts
>
template
<
class
C
,
typename
...
Ts
>
void
add_hook
(
Ts
&&
...
xs
)
{
void
add_hook
(
Ts
&&
...
xs
)
{
// if only we could move a unique_ptr into a lambda in C++11
// if only we could move a unique_ptr into a lambda in C++11
auto
ptr
=
new
C
(
std
::
forward
<
Ts
>
(
xs
)...);
auto
ptr
=
new
C
(
s
ystem_
,
s
td
::
forward
<
Ts
>
(
xs
)...);
backend
().
dispatch
([
=
]
{
backend
().
dispatch
([
=
]
{
ptr
->
next
.
swap
(
hooks_
);
ptr
->
next
.
swap
(
hooks_
);
hooks_
.
reset
(
ptr
);
hooks_
.
reset
(
ptr
);
...
@@ -171,7 +171,7 @@ public:
...
@@ -171,7 +171,7 @@ public:
template
<
class
F
>
template
<
class
F
>
void
add_shutdown_cb
(
F
fun
)
{
void
add_shutdown_cb
(
F
fun
)
{
struct
impl
:
hook
{
struct
impl
:
hook
{
impl
(
F
&&
f
)
:
fun_
(
std
::
move
(
f
))
{
impl
(
actor_system
&
,
F
&&
f
)
:
fun_
(
std
::
move
(
f
))
{
// nop
// nop
}
}
...
...
libcaf_io/src/middleman.cpp
View file @
ca84509a
...
@@ -294,9 +294,10 @@ actor_addr middleman::remote_actor(std::set<std::string> ifs,
...
@@ -294,9 +294,10 @@ actor_addr middleman::remote_actor(std::set<std::string> ifs,
if
(
!
(
xs
.
empty
()
&&
ifs
.
empty
())
if
(
!
(
xs
.
empty
()
&&
ifs
.
empty
())
&&
!
std
::
includes
(
xs
.
begin
(),
xs
.
end
(),
ifs
.
begin
(),
ifs
.
end
()))
{
&&
!
std
::
includes
(
xs
.
begin
(),
xs
.
end
(),
ifs
.
begin
(),
ifs
.
end
()))
{
std
::
string
what
=
"expected signature: "
;
std
::
string
what
=
"expected signature: "
;
what
+=
deep_to_string
(
xs
);
what
+=
", found: "
;
what
+=
deep_to_string
(
ifs
);
what
+=
deep_to_string
(
ifs
);
what
+=
", found: "
;
what
+=
deep_to_string
(
xs
);
throw
network_error
(
std
::
move
(
what
));
throw
network_error
(
std
::
move
(
what
));
}
}
result
=
std
::
move
(
res
);
result
=
std
::
move
(
res
);
...
...
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