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
2dfe753e
Commit
2dfe753e
authored
Feb 17, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate remaining `*_send_tuple` functions
parent
889067e5
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
212 additions
and
235 deletions
+212
-235
examples/remote_actors/distributed_calculator.cpp
examples/remote_actors/distributed_calculator.cpp
+1
-1
libcaf_core/caf/local_actor.hpp
libcaf_core/caf/local_actor.hpp
+4
-16
libcaf_core/caf/mixin/sync_sender.hpp
libcaf_core/caf/mixin/sync_sender.hpp
+199
-206
libcaf_core/src/local_actor.cpp
libcaf_core/src/local_actor.cpp
+7
-11
unit_testing/test_sync_send.cpp
unit_testing/test_sync_send.cpp
+1
-1
No files found.
examples/remote_actors/distributed_calculator.cpp
View file @
2dfe753e
...
@@ -78,7 +78,7 @@ void client_bhvr(event_based_actor* self, const string& host,
...
@@ -78,7 +78,7 @@ void client_bhvr(event_based_actor* self, const string& host,
}
}
}
}
auto
sync_send_request
=
[
=
](
int
lhs
,
const
char
*
op
,
int
rhs
)
{
auto
sync_send_request
=
[
=
](
int
lhs
,
const
char
*
op
,
int
rhs
)
{
self
->
sync_send
_tuple
(
server
,
self
->
last_dequeued
()).
then
(
self
->
sync_send
(
server
,
self
->
last_dequeued
()).
then
(
[
=
](
result_atom
,
int
result
)
{
[
=
](
result_atom
,
int
result
)
{
aout
(
self
)
<<
lhs
<<
" "
<<
op
<<
" "
<<
rhs
<<
" = "
<<
result
<<
endl
;
aout
(
self
)
<<
lhs
<<
" "
<<
op
<<
" "
<<
rhs
<<
" = "
<<
result
<<
endl
;
}
}
...
...
libcaf_core/caf/local_actor.hpp
View file @
2dfe753e
...
@@ -400,11 +400,11 @@ class local_actor : public abstract_actor {
...
@@ -400,11 +400,11 @@ class local_actor : public abstract_actor {
attach
(
attachable_ptr
{
new
functor_attachable
(
std
::
move
(
f
))});
attach
(
attachable_ptr
{
new
functor_attachable
(
std
::
move
(
f
))});
}
}
// <backward_compatibility version="0.9">
/**************************************************************************
/**************************************************************************
* outdated member functions *
* outdated member functions *
**************************************************************************/
**************************************************************************/
// <backward_compatibility version="0.9">
inline
void
send_tuple
(
message_priority
prio
,
const
channel
&
whom
,
inline
void
send_tuple
(
message_priority
prio
,
const
channel
&
whom
,
message
what
)
CAF_DEPRECATED
;
message
what
)
CAF_DEPRECATED
;
...
@@ -464,23 +464,11 @@ class local_actor : public abstract_actor {
...
@@ -464,23 +464,11 @@ class local_actor : public abstract_actor {
}
}
// returns the response ID
// returns the response ID
message_id
timed_sync_send_tuple_impl
(
message_priority
mp
,
message_id
timed_sync_send_impl
(
message_priority
,
const
actor
&
,
const
actor
&
whom
,
const
duration
&
,
message
&&
);
const
duration
&
rel_time
,
message
&&
what
);
// returns the response ID
// returns the response ID
message_id
sync_send_tuple_impl
(
message_priority
mp
,
message_id
sync_send_impl
(
message_priority
,
const
actor
&
,
message
&&
);
const
actor
&
whom
,
message
&&
what
);
// returns the response ID
template
<
class
...
Rs
,
class
...
Ts
>
message_id
sync_send_tuple_impl
(
message_priority
mp
,
const
typed_actor
<
Rs
...
>&
whom
,
message
&&
msg
)
{
return
sync_send_tuple_impl
(
mp
,
actor
{
whom
.
m_ptr
.
get
()},
std
::
move
(
msg
));
}
// returns 0 if last_dequeued() is an asynchronous or sync request message,
// returns 0 if last_dequeued() is an asynchronous or sync request message,
// a response id generated from the request id otherwise
// a response id generated from the request id otherwise
...
...
libcaf_core/caf/mixin/sync_sender.hpp
View file @
2dfe753e
This diff is collapsed.
Click to expand it.
libcaf_core/src/local_actor.cpp
View file @
2dfe753e
...
@@ -179,14 +179,12 @@ void local_actor::quit(uint32_t reason) {
...
@@ -179,14 +179,12 @@ void local_actor::quit(uint32_t reason) {
}
}
}
}
message_id
local_actor
::
timed_sync_send_
tuple_
impl
(
message_priority
mp
,
message_id
local_actor
::
timed_sync_send_impl
(
message_priority
mp
,
const
actor
&
dest
,
const
actor
&
dest
,
const
duration
&
rtime
,
const
duration
&
rtime
,
message
&&
what
)
{
message
&&
what
)
{
if
(
!
dest
)
{
if
(
!
dest
)
{
throw
std
::
invalid_argument
(
throw
std
::
invalid_argument
(
"cannot sync_send to invalid_actor"
);
"cannot send synchronous message "
"to invalid_actor"
);
}
}
auto
nri
=
new_request_id
();
auto
nri
=
new_request_id
();
if
(
mp
==
message_priority
::
high
)
{
if
(
mp
==
message_priority
::
high
)
{
...
@@ -200,13 +198,11 @@ message_id local_actor::timed_sync_send_tuple_impl(message_priority mp,
...
@@ -200,13 +198,11 @@ message_id local_actor::timed_sync_send_tuple_impl(message_priority mp,
return
rri
;
return
rri
;
}
}
message_id
local_actor
::
sync_send_
tuple_
impl
(
message_priority
mp
,
message_id
local_actor
::
sync_send_impl
(
message_priority
mp
,
const
actor
&
dest
,
const
actor
&
dest
,
message
&&
what
)
{
message
&&
what
)
{
if
(
!
dest
)
{
if
(
!
dest
)
{
throw
std
::
invalid_argument
(
throw
std
::
invalid_argument
(
"cannot sync_send to invalid_actor"
);
"cannot send synchronous message "
"to invalid_actor"
);
}
}
auto
nri
=
new_request_id
();
auto
nri
=
new_request_id
();
if
(
mp
==
message_priority
::
high
)
{
if
(
mp
==
message_priority
::
high
)
{
...
...
unit_testing/test_sync_send.cpp
View file @
2dfe753e
...
@@ -158,7 +158,7 @@ class D : public popular_actor {
...
@@ -158,7 +158,7 @@ class D : public popular_actor {
behavior
make_behavior
()
override
{
behavior
make_behavior
()
override
{
return
{
return
{
others
()
>>
[
=
]
{
others
()
>>
[
=
]
{
return
sync_send
_tuple
(
buddy
(),
last_dequeued
()).
then
(
return
sync_send
(
buddy
(),
last_dequeued
()).
then
(
others
()
>>
[
=
]()
->
message
{
others
()
>>
[
=
]()
->
message
{
quit
();
quit
();
return
last_dequeued
();
return
last_dequeued
();
...
...
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