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
f456a5da
Commit
f456a5da
authored
Sep 26, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary copy and move restrictions
parent
11c8986e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
libcaf_core/caf/execution_unit.hpp
libcaf_core/caf/execution_unit.hpp
+7
-4
libcaf_core/caf/scoped_execution_unit.hpp
libcaf_core/caf/scoped_execution_unit.hpp
+9
-2
libcaf_core/src/scoped_execution_unit.cpp
libcaf_core/src/scoped_execution_unit.cpp
+1
-2
No files found.
libcaf_core/caf/execution_unit.hpp
View file @
f456a5da
...
...
@@ -30,8 +30,11 @@ class execution_unit {
public:
explicit
execution_unit
(
actor_system
*
sys
);
execution_unit
(
execution_unit
&&
)
=
delete
;
execution_unit
(
const
execution_unit
&
)
=
delete
;
execution_unit
()
=
default
;
execution_unit
(
execution_unit
&&
)
=
default
;
execution_unit
&
operator
=
(
execution_unit
&&
)
=
default
;
execution_unit
(
const
execution_unit
&
)
=
default
;
execution_unit
&
operator
=
(
const
execution_unit
&
)
=
default
;
virtual
~
execution_unit
();
...
...
@@ -58,8 +61,8 @@ public:
}
protected:
actor_system
*
system_
;
proxy_registry
*
proxies_
;
actor_system
*
system_
=
nullptr
;
proxy_registry
*
proxies_
=
nullptr
;
};
}
// namespace caf
...
...
libcaf_core/caf/scoped_execution_unit.hpp
View file @
f456a5da
...
...
@@ -26,11 +26,18 @@ namespace caf {
/// querying its execution unit, an actor can access other context information.
class
scoped_execution_unit
:
public
execution_unit
{
public:
/// @pre `sys != nullptr`
explicit
scoped_execution_unit
(
actor_system
*
sys
=
nullptr
);
using
super
=
execution_unit
;
using
super
::
super
;
~
scoped_execution_unit
()
override
;
/// Delegates the resumable to the scheduler of `system()`.
void
exec_later
(
resumable
*
ptr
)
override
;
void
system_ptr
(
actor_system
*
ptr
)
noexcept
{
system_
=
ptr
;
}
};
}
// namespace caf
...
...
libcaf_core/src/scoped_execution_unit.cpp
View file @
f456a5da
...
...
@@ -23,8 +23,7 @@
namespace
caf
{
scoped_execution_unit
::
scoped_execution_unit
(
actor_system
*
sys
)
:
execution_unit
(
sys
){
scoped_execution_unit
::~
scoped_execution_unit
()
{
// nop
}
...
...
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