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
a0653c14
Commit
a0653c14
authored
Nov 29, 2017
by
Dominik Charousset
Committed by
Dominik Charousset
Feb 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate `priority_aware` flag
parent
e6c6f49f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
27 deletions
+8
-27
libcaf_core/caf/abstract_actor.hpp
libcaf_core/caf/abstract_actor.hpp
+0
-1
libcaf_core/caf/actor_system.hpp
libcaf_core/caf/actor_system.hpp
+0
-3
libcaf_core/caf/spawn_options.hpp
libcaf_core/caf/spawn_options.hpp
+4
-4
libcaf_core/src/actor_config.cpp
libcaf_core/src/actor_config.cpp
+0
-1
libcaf_core/test/message_lifetime.cpp
libcaf_core/test/message_lifetime.cpp
+4
-18
No files found.
libcaf_core/caf/abstract_actor.hpp
View file @
a0653c14
...
@@ -127,7 +127,6 @@ public:
...
@@ -127,7 +127,6 @@ public:
static
constexpr
int
is_initialized_flag
=
0x0010
;
// event-based actors
static
constexpr
int
is_initialized_flag
=
0x0010
;
// event-based actors
static
constexpr
int
is_blocking_flag
=
0x0020
;
// blocking_actor
static
constexpr
int
is_blocking_flag
=
0x0020
;
// blocking_actor
static
constexpr
int
is_detached_flag
=
0x0040
;
// local_actor
static
constexpr
int
is_detached_flag
=
0x0040
;
// local_actor
static
constexpr
int
is_priority_aware_flag
=
0x0080
;
// local_actor
static
constexpr
int
is_serializable_flag
=
0x0100
;
// local_actor
static
constexpr
int
is_serializable_flag
=
0x0100
;
// local_actor
static
constexpr
int
is_migrated_from_flag
=
0x0200
;
// local_actor
static
constexpr
int
is_migrated_from_flag
=
0x0200
;
// local_actor
static
constexpr
int
has_used_aout_flag
=
0x0400
;
// local_actor
static
constexpr
int
has_used_aout_flag
=
0x0400
;
// local_actor
...
...
libcaf_core/caf/actor_system.hpp
View file @
a0653c14
...
@@ -523,9 +523,6 @@ private:
...
@@ -523,9 +523,6 @@ private:
spawn_impl
(
actor_config
&
cfg
,
Ts
&&
...
xs
)
{
spawn_impl
(
actor_config
&
cfg
,
Ts
&&
...
xs
)
{
static_assert
(
is_unbound
(
Os
),
static_assert
(
is_unbound
(
Os
),
"top-level spawns cannot have monitor or link flag"
);
"top-level spawns cannot have monitor or link flag"
);
cfg
.
flags
=
has_priority_aware_flag
(
Os
)
?
abstract_actor
::
is_priority_aware_flag
:
0
;
if
(
has_detach_flag
(
Os
)
||
std
::
is_base_of
<
blocking_actor
,
C
>::
value
)
if
(
has_detach_flag
(
Os
)
||
std
::
is_base_of
<
blocking_actor
,
C
>::
value
)
cfg
.
flags
|=
abstract_actor
::
is_detached_flag
;
cfg
.
flags
|=
abstract_actor
::
is_detached_flag
;
if
(
has_hide_flag
(
Os
))
if
(
has_hide_flag
(
Os
))
...
...
libcaf_core/caf/spawn_options.hpp
View file @
a0653c14
...
@@ -65,8 +65,8 @@ constexpr spawn_options detached = spawn_options::detach_flag;
...
@@ -65,8 +65,8 @@ constexpr spawn_options detached = spawn_options::detach_flag;
constexpr
spawn_options
hidden
=
spawn_options
::
hide_flag
;
constexpr
spawn_options
hidden
=
spawn_options
::
hide_flag
;
/// Causes the new actor to evaluate message priorities.
/// Causes the new actor to evaluate message priorities.
/// @note This implicitly causes the actor to run in its own thread.
constexpr
spawn_options
priority_aware
CAF_DEPRECATED
=
constexpr
spawn_options
priority_aware
=
spawn_options
::
priority_aware_flag
;
spawn_options
::
priority_aware_flag
;
/// Causes the new actor to delay its
/// Causes the new actor to delay its
/// initialization until a message arrives.
/// initialization until a message arrives.
...
@@ -86,8 +86,8 @@ constexpr bool has_detach_flag(spawn_options opts) {
...
@@ -86,8 +86,8 @@ constexpr bool has_detach_flag(spawn_options opts) {
/// Checks wheter the {@link priority_aware} flag is set in `opts`.
/// Checks wheter the {@link priority_aware} flag is set in `opts`.
/// @relates spawn_options
/// @relates spawn_options
constexpr
bool
has_priority_aware_flag
(
spawn_options
opts
)
{
constexpr
bool
has_priority_aware_flag
(
spawn_options
)
{
return
has_spawn_option
(
opts
,
priority_aware
)
;
return
true
;
}
}
/// Checks wheter the {@link hidden} flag is set in `opts`.
/// Checks wheter the {@link hidden} flag is set in `opts`.
...
...
libcaf_core/src/actor_config.cpp
View file @
a0653c14
...
@@ -43,7 +43,6 @@ std::string to_string(const actor_config& x) {
...
@@ -43,7 +43,6 @@ std::string to_string(const actor_config& x) {
add
(
abstract_channel
::
is_actor_dot_decorator_flag
,
"dot_decorator_flag"
);
add
(
abstract_channel
::
is_actor_dot_decorator_flag
,
"dot_decorator_flag"
);
add
(
abstract_actor
::
is_detached_flag
,
"detached_flag"
);
add
(
abstract_actor
::
is_detached_flag
,
"detached_flag"
);
add
(
abstract_actor
::
is_blocking_flag
,
"blocking_flag"
);
add
(
abstract_actor
::
is_blocking_flag
,
"blocking_flag"
);
add
(
abstract_actor
::
is_priority_aware_flag
,
"priority_aware_flag"
);
add
(
abstract_actor
::
is_hidden_flag
,
"hidden_flag"
);
add
(
abstract_actor
::
is_hidden_flag
,
"hidden_flag"
);
result
+=
")"
;
result
+=
")"
;
return
result
;
return
result
;
...
...
libcaf_core/test/message_lifetime.cpp
View file @
a0653c14
...
@@ -82,19 +82,8 @@ private:
...
@@ -82,19 +82,8 @@ private:
};
};
struct
fixture
{
struct
fixture
{
fixture
()
:
system
(
cfg
)
{
// nop
}
template
<
spawn_options
Os
>
void
test_message_lifetime
()
{
// put some preassure on the scheduler (check for thread safety)
for
(
size_t
i
=
0
;
i
<
100
;
++
i
)
system
.
spawn
<
tester
>
(
system
.
spawn
<
testee
,
Os
>
());
}
actor_system_config
cfg
;
actor_system_config
cfg
;
actor_system
system
;
actor_system
system
{
cfg
}
;
};
};
}
// namespace <anonymous>
}
// namespace <anonymous>
...
@@ -126,12 +115,9 @@ CAF_TEST(message_lifetime_in_scoped_actor) {
...
@@ -126,12 +115,9 @@ CAF_TEST(message_lifetime_in_scoped_actor) {
CAF_CHECK_EQUAL
(
msg
.
get_as
<
int
>
(
0
),
42
);
CAF_CHECK_EQUAL
(
msg
.
get_as
<
int
>
(
0
),
42
);
}
}
CAF_TEST
(
message_lifetime_no_spawn_options
)
{
CAF_TEST
(
message_lifetime_in_spawned_actor
)
{
test_message_lifetime
<
no_spawn_options
>
();
for
(
size_t
i
=
0
;
i
<
100
;
++
i
)
}
system
.
spawn
<
tester
>
(
system
.
spawn
<
testee
>
());
CAF_TEST
(
message_lifetime_priority_aware
)
{
test_message_lifetime
<
priority_aware
>
();
}
}
CAF_TEST_FIXTURE_SCOPE_END
()
CAF_TEST_FIXTURE_SCOPE_END
()
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