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
0541cbae
Commit
0541cbae
authored
Jan 16, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove all deprecated functionality
parent
035bfe0a
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
142 additions
and
304 deletions
+142
-304
libcaf_core/caf/actor.hpp
libcaf_core/caf/actor.hpp
+0
-9
libcaf_core/caf/actor_addr.hpp
libcaf_core/caf/actor_addr.hpp
+0
-2
libcaf_core/caf/actor_system_config.hpp
libcaf_core/caf/actor_system_config.hpp
+0
-51
libcaf_core/caf/function_view.hpp
libcaf_core/caf/function_view.hpp
+1
-1
libcaf_core/caf/message_id.hpp
libcaf_core/caf/message_id.hpp
+0
-13
libcaf_core/caf/scheduler/test_coordinator.hpp
libcaf_core/caf/scheduler/test_coordinator.hpp
+0
-4
libcaf_core/caf/spawn_options.hpp
libcaf_core/caf/spawn_options.hpp
+0
-4
libcaf_core/caf/typed_actor.hpp
libcaf_core/caf/typed_actor.hpp
+0
-11
libcaf_core/src/actor.cpp
libcaf_core/src/actor.cpp
+0
-4
libcaf_core/src/actor_addr.cpp
libcaf_core/src/actor_addr.cpp
+0
-4
libcaf_core/src/actor_system_config.cpp
libcaf_core/src/actor_system_config.cpp
+64
-154
libcaf_core/src/settings.cpp
libcaf_core/src/settings.cpp
+71
-0
libcaf_core/src/test_coordinator.cpp
libcaf_core/src/test_coordinator.cpp
+0
-11
libcaf_core/test/thread_hook.cpp
libcaf_core/test/thread_hook.cpp
+6
-1
libcaf_test/caf/test/dsl.hpp
libcaf_test/caf/test/dsl.hpp
+0
-29
libcaf_test/caf/test/io_dsl.hpp
libcaf_test/caf/test/io_dsl.hpp
+0
-6
No files found.
libcaf_core/caf/actor.hpp
View file @
0541cbae
...
...
@@ -31,7 +31,6 @@
#include "caf/actor_marker.hpp"
#include "caf/abstract_actor.hpp"
#include "caf/actor_control_block.hpp"
#include "caf/unsafe_actor_handle_init.hpp"
#include "caf/detail/comparable.hpp"
#include "caf/detail/type_traits.hpp"
...
...
@@ -82,8 +81,6 @@ public:
actor
(
const
scoped_actor
&
);
explicit
actor
(
const
unsafe_actor_handle_init_t
&
)
CAF_DEPRECATED
;
template
<
class
T
,
class
=
typename
std
::
enable_if
<
std
::
is_base_of
<
dynamically_typed_actor_base
,
T
>
::
value
...
...
@@ -143,12 +140,6 @@ public:
/// Exchange content of `*this` and `other`.
void
swap
(
actor
&
other
)
noexcept
;
/// Queries whether this object was constructed using
/// `unsafe_actor_handle_init` or is in moved-from state.
bool
unsafe
()
const
CAF_DEPRECATED
{
return
!
ptr_
;
}
/// @cond PRIVATE
inline
abstract_actor
*
operator
->
()
const
noexcept
{
...
...
libcaf_core/caf/actor_addr.hpp
View file @
0541cbae
...
...
@@ -26,7 +26,6 @@
#include "caf/fwd.hpp"
#include "caf/abstract_actor.hpp"
#include "caf/actor_control_block.hpp"
#include "caf/unsafe_actor_handle_init.hpp"
#include "caf/detail/comparable.hpp"
...
...
@@ -57,7 +56,6 @@ public:
actor_addr
&
operator
=
(
const
actor_addr
&
)
=
default
;
actor_addr
(
std
::
nullptr_t
);
actor_addr
(
const
unsafe_actor_handle_init_t
&
);
actor_addr
&
operator
=
(
std
::
nullptr_t
);
...
...
libcaf_core/caf/actor_system_config.hpp
View file @
0541cbae
...
...
@@ -133,11 +133,6 @@ public:
actor_system_config
&
parse
(
int
argc
,
char
**
argv
,
const
char
*
ini_file_cstr
=
nullptr
);
actor_system_config
&
parse
(
message
&
args
,
const
char
*
ini_file_cstr
=
nullptr
)
CAF_DEPRECATED
;
actor_system_config
&
parse
(
message
&
args
,
std
::
istream
&
ini
)
CAF_DEPRECATED
;
/// Allows other nodes to spawn actors created by `fun`
/// dynamically by using `name` as identifier.
/// @experimental
...
...
@@ -248,9 +243,6 @@ public:
/// and instead return from `main` immediately.
bool
cli_helptext_printed
;
/// Stores CLI arguments that were not consumed by CAF.
message
args_remainder
CAF_DEPRECATED
;
/// Stores CLI arguments that were not consumed by CAF.
string_list
remainder
;
...
...
@@ -279,49 +271,6 @@ public:
/// @private
timespan
stream_tick_duration
()
const
noexcept
;
timespan
streaming_credit_round_interval
()
const
noexcept
CAF_DEPRECATED
;
// -- scheduling parameters --------------------------------------------------
atom_value
scheduler_policy
CAF_DEPRECATED
;
size_t
scheduler_max_threads
CAF_DEPRECATED
;
size_t
scheduler_max_throughput
CAF_DEPRECATED
;
bool
scheduler_enable_profiling
CAF_DEPRECATED
;
size_t
scheduler_profiling_ms_resolution
CAF_DEPRECATED
;
std
::
string
scheduler_profiling_output_file
CAF_DEPRECATED
;
// -- work-stealing parameters -----------------------------------------------
size_t
work_stealing_aggressive_poll_attempts
CAF_DEPRECATED
;
size_t
work_stealing_aggressive_steal_interval
CAF_DEPRECATED
;
size_t
work_stealing_moderate_poll_attempts
CAF_DEPRECATED
;
size_t
work_stealing_moderate_steal_interval
CAF_DEPRECATED
;
size_t
work_stealing_moderate_sleep_duration_us
CAF_DEPRECATED
;
size_t
work_stealing_relaxed_steal_interval
CAF_DEPRECATED
;
size_t
work_stealing_relaxed_sleep_duration_us
CAF_DEPRECATED
;
// -- logger parameters ------------------------------------------------------
std
::
string
logger_file_name
CAF_DEPRECATED
;
std
::
string
logger_file_format
CAF_DEPRECATED
;
atom_value
logger_console
CAF_DEPRECATED
;
std
::
string
logger_console_format
CAF_DEPRECATED
;
std
::
string
logger_component_filter
CAF_DEPRECATED
;
atom_value
logger_verbosity
CAF_DEPRECATED
;
bool
logger_inline_output
CAF_DEPRECATED
;
// -- middleman parameters ---------------------------------------------------
atom_value
middleman_network_backend
CAF_DEPRECATED
;
std
::
string
middleman_app_identifier
CAF_DEPRECATED
;
bool
middleman_enable_automatic_connections
CAF_DEPRECATED
;
size_t
middleman_max_consecutive_reads
CAF_DEPRECATED
;
size_t
middleman_heartbeat_interval
CAF_DEPRECATED
;
bool
middleman_detach_utility_actors
CAF_DEPRECATED
;
bool
middleman_detach_multiplexer
CAF_DEPRECATED
;
size_t
middleman_cached_udp_buffers
CAF_DEPRECATED
;
size_t
middleman_max_pending_msgs
CAF_DEPRECATED
;
// -- OpenCL parameters ------------------------------------------------------
std
::
string
opencl_device_ids
;
...
...
libcaf_core/caf/function_view.hpp
View file @
0541cbae
...
...
@@ -122,7 +122,7 @@ struct function_view_result {
template
<
class
...
Ts
>
struct
function_view_result
<
typed_actor
<
Ts
...
>>
{
typed_actor
<
Ts
...
>
value
{
unsafe_actor_handle_init
};
typed_actor
<
Ts
...
>
value
{
nullptr
};
};
/// A function view for an actor hides any messaging from the caller.
...
...
libcaf_core/caf/message_id.hpp
View file @
0541cbae
...
...
@@ -200,12 +200,6 @@ public:
return
f
(
meta
::
type_name
(
"message_id"
),
x
.
value_
);
}
// -- deprecated functions ---------------------------------------------------
template
<
class
...
Ts
>
static
message_id
make
(
Ts
&&
...
xs
)
CAF_DEPRECATED_MSG
(
"use make_message_id instead"
);
private:
// -- member variables -------------------------------------------------------
...
...
@@ -241,13 +235,6 @@ constexpr message_id make_message_id(message_priority p) {
return
message_id
{
static_cast
<
uint64_t
>
(
p
)
<<
message_id
::
category_offset
};
}
// -- deprecated functions -----------------------------------------------------
template
<
class
...
Ts
>
message_id
message_id
::
make
(
Ts
&&
...
xs
)
{
return
make_message_id
(
std
::
forward
<
Ts
>
(
xs
)...);
}
}
// namespace caf
namespace
std
{
...
...
libcaf_core/caf/scheduler/test_coordinator.hpp
View file @
0541cbae
...
...
@@ -142,10 +142,6 @@ public:
detail
::
test_actor_clock
&
clock
()
noexcept
override
;
std
::
pair
<
size_t
,
size_t
>
run_dispatch_loop
(
timespan
cycle_duration
=
timespan
{
1
})
CAF_DEPRECATED_MSG
(
"use the testing DSL's run() instead"
);
protected:
void
start
()
override
;
...
...
libcaf_core/caf/spawn_options.hpp
View file @
0541cbae
...
...
@@ -63,10 +63,6 @@ constexpr spawn_options detached = spawn_options::detach_flag;
/// Causes the runtime to ignore the new actor in `await_all_actors_done()`.
constexpr
spawn_options
hidden
=
spawn_options
::
hide_flag
;
/// Causes the new actor to evaluate message priorities.
constexpr
spawn_options
priority_aware
CAF_DEPRECATED
=
spawn_options
::
priority_aware_flag
;
/// Causes the new actor to delay its
/// initialization until a message arrives.
constexpr
spawn_options
lazy_init
=
spawn_options
::
lazy_init_flag
;
...
...
libcaf_core/caf/typed_actor.hpp
View file @
0541cbae
...
...
@@ -31,7 +31,6 @@
#include "caf/stateful_actor.hpp"
#include "caf/typed_behavior.hpp"
#include "caf/typed_response_promise.hpp"
#include "caf/unsafe_actor_handle_init.hpp"
#include "caf/detail/mpi_splice.hpp"
#include "caf/decorator/splitter.hpp"
...
...
@@ -172,10 +171,6 @@ class typed_actor : detail::comparable<typed_actor<Sigs...>>,
return
*
this
;
}
explicit
typed_actor
(
const
unsafe_actor_handle_init_t
&
)
CAF_DEPRECATED
{
// nop
}
/// Queries whether this actor handle is valid.
inline
explicit
operator
bool
()
const
{
return
static_cast
<
bool
>
(
ptr_
);
...
...
@@ -211,12 +206,6 @@ class typed_actor : detail::comparable<typed_actor<Sigs...>>,
ptr_
.
swap
(
other
.
ptr_
);
}
/// Queries whether this object was constructed using
/// `unsafe_actor_handle_init` or is in moved-from state.
bool
unsafe
()
const
CAF_DEPRECATED
{
return
!
ptr_
;
}
/// @cond PRIVATE
abstract_actor
*
operator
->
()
const
noexcept
{
...
...
libcaf_core/src/actor.cpp
View file @
0541cbae
...
...
@@ -43,10 +43,6 @@ actor::actor(const scoped_actor& x) : ptr_(actor_cast<strong_actor_ptr>(x)) {
// nop
}
actor
::
actor
(
const
unsafe_actor_handle_init_t
&
)
:
ptr_
(
nullptr
)
{
// nop
}
actor
::
actor
(
actor_control_block
*
ptr
)
:
ptr_
(
ptr
)
{
// nop
}
...
...
libcaf_core/src/actor_addr.cpp
View file @
0541cbae
...
...
@@ -31,10 +31,6 @@ actor_addr::actor_addr(std::nullptr_t) {
// nop
}
actor_addr
::
actor_addr
(
const
unsafe_actor_handle_init_t
&
)
{
// nop
}
actor_addr
&
actor_addr
::
operator
=
(
std
::
nullptr_t
)
{
ptr_
.
reset
();
return
*
this
;
...
...
libcaf_core/src/actor_system_config.cpp
View file @
0541cbae
This diff is collapsed.
Click to expand it.
libcaf_core/
caf/unsafe_actor_handle_init.h
pp
→
libcaf_core/
src/settings.c
pp
View file @
0541cbae
...
...
@@ -16,15 +16,56 @@
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#
pragma once
#
include "caf/settings.hpp"
namespace
caf
{
/// Tag type to select the unsafe constructor of actor handles.
struct
unsafe_actor_handle_init_t
{
};
std
::
string
get_or
(
const
settings
&
xs
,
string_view
name
,
string_view
default_value
)
{
auto
result
=
get_if
<
std
::
string
>
(
&
xs
,
name
);
if
(
result
)
return
std
::
move
(
*
result
);
return
std
::
string
{
default_value
.
begin
(),
default_value
.
end
()};
}
static
constexpr
unsafe_actor_handle_init_t
unsafe_actor_handle_init
=
unsafe_actor_handle_init_t
{};
void
put_impl
(
settings
&
dict
,
const
std
::
vector
<
string_view
>&
path
,
config_value
&
value
)
{
// Sanity check.
if
(
path
.
empty
())
return
;
// Navigate path.
auto
last
=
path
.
end
();
auto
back
=
last
-
1
;
auto
current
=
&
dict
;
// Resolve path by navigating the map-of-maps of create the necessary layout
// when needed.
for
(
auto
i
=
path
.
begin
();
i
!=
back
;
++
i
)
{
auto
iter
=
current
->
emplace
(
*
i
,
settings
{}).
first
;
if
(
auto
val
=
get_if
<
settings
>
(
&
iter
->
second
))
{
current
=
val
;
}
else
{
iter
->
second
=
settings
{};
current
=
&
get
<
settings
>
(
iter
->
second
);
}
}
// Set key-value pair on the leaf.
current
->
insert_or_assign
(
*
back
,
std
::
move
(
value
));
}
}
// namespace caf
void
put_impl
(
settings
&
dict
,
string_view
key
,
config_value
&
value
)
{
std
::
vector
<
string_view
>
path
;
split
(
path
,
key
,
"."
);
put_impl
(
dict
,
path
,
value
);
}
config_value
::
list
&
put_list
(
settings
&
xs
,
std
::
string
name
)
{
auto
i
=
xs
.
insert_or_assign
(
std
::
move
(
name
),
config_value
::
list
{});
return
get
<
config_value
::
list
>
(
i
.
first
->
second
);
}
config_value
::
dictionary
&
put_dictionary
(
settings
&
xs
,
std
::
string
name
)
{
auto
i
=
xs
.
insert_or_assign
(
std
::
move
(
name
),
settings
{});
return
get
<
config_value
::
dictionary
>
(
i
.
first
->
second
);
}
}
// namespace caf
libcaf_core/src/test_coordinator.cpp
View file @
0541cbae
...
...
@@ -161,17 +161,6 @@ void test_coordinator::inline_all_enqueues_helper() {
after_next_enqueue
([
=
]
{
inline_all_enqueues_helper
();
});
}
std
::
pair
<
size_t
,
size_t
>
test_coordinator
::
run_dispatch_loop
(
timespan
cycle_duration
)
{
size_t
messages
=
0
;
size_t
timeouts
=
0
;
while
(
has_job
()
||
has_pending_timeout
())
{
messages
+=
run
();
timeouts
+=
advance_time
(
cycle_duration
);
}
return
{
messages
,
timeouts
};
}
}
// namespace caf
}
// namespace scheduler
libcaf_core/test/thread_hook.cpp
View file @
0541cbae
...
...
@@ -33,13 +33,18 @@ using atomic_count = std::atomic<size_t>;
size_t
assumed_thread_count
;
size_t
assumed_init_calls
;
std
::
mutex
mx
;
struct
dummy_thread_hook
:
thread_hook
{
void
init
(
actor_system
&
)
override
{
// nop
}
void
thread_started
()
override
{
// nop
void
*
array
[
20
];
\
auto
caf_bt_size
=
::
backtrace
(
array
,
20
);
\
std
::
unique_lock
<
std
::
mutex
>
guard
{
mx
};
::
backtrace_symbols_fd
(
array
,
caf_bt_size
,
2
);
\
}
void
thread_terminates
()
override
{
...
...
libcaf_test/caf/test/dsl.hpp
View file @
0541cbae
...
...
@@ -570,7 +570,6 @@ public:
caf
::
timespan
{
1000
});
// Make sure the current time isn't 0.
sched
.
clock
().
current_time
+=
std
::
chrono
::
hours
(
1
);
credit_round_interval
=
cfg
.
stream_credit_round_interval
;
}
virtual
~
test_coordinator_fixture
()
{
...
...
@@ -741,36 +740,8 @@ public:
/// Deterministic scheduler.
scheduler_type
&
sched
;
// -- deprecated functionality -----------------------------------------------
void
run_exhaustively
()
CAF_DEPRECATED_MSG
(
"use run() instead"
);
void
run_exhaustively_until
(
std
::
function
<
bool
()
>
f
)
CAF_DEPRECATED_MSG
(
"use run_until() instead"
);
void
loop_after_next_enqueue
()
CAF_DEPRECATED_MSG
(
"use run_after_next_ready_event() instead"
);
caf
::
timespan
credit_round_interval
CAF_DEPRECATED
;
};
template
<
class
Config
>
void
test_coordinator_fixture
<
Config
>::
run_exhaustively
()
{
run
();
}
template
<
class
Config
>
void
test_coordinator_fixture
<
Config
>::
run_exhaustively_until
(
std
::
function
<
bool
()
>
f
)
{
run_until
(
std
::
move
(
f
));
}
template
<
class
Config
>
void
test_coordinator_fixture
<
Config
>::
loop_after_next_enqueue
()
{
sched
.
after_next_enqueue
([
=
]
{
run
();
});
}
/// Unboxes an expected value or fails the test if it doesn't exist.
template
<
class
T
>
T
unbox
(
caf
::
expected
<
T
>
x
)
{
...
...
libcaf_test/caf/test/io_dsl.hpp
View file @
0541cbae
...
...
@@ -104,12 +104,6 @@ public:
/// Callback for triggering all nodes when simulating a network of CAF nodes.
run_all_nodes_fun
run_all_nodes
;
// -- deprecated functions ---------------------------------------------------
void
exec_all
()
CAF_DEPRECATED_MSG
(
"use run() instead"
)
{
this
->
run
();
}
// -- overriding member functions --------------------------------------------
bool
consume_message
()
override
{
...
...
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