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
639ac2ed
Commit
639ac2ed
authored
Jan 16, 2021
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/neverlord/cleanup'
parents
6129cc74
01b82717
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
34 additions
and
152 deletions
+34
-152
libcaf_core/caf/abstract_actor.hpp
libcaf_core/caf/abstract_actor.hpp
+0
-1
libcaf_core/caf/actor_companion.hpp
libcaf_core/caf/actor_companion.hpp
+0
-1
libcaf_core/caf/detail/behavior_impl.hpp
libcaf_core/caf/detail/behavior_impl.hpp
+1
-1
libcaf_core/caf/detail/disposer.hpp
libcaf_core/caf/detail/disposer.hpp
+0
-26
libcaf_core/caf/detail/embedded.hpp
libcaf_core/caf/detail/embedded.hpp
+0
-37
libcaf_core/caf/detail/profiled_send.hpp
libcaf_core/caf/detail/profiled_send.hpp
+1
-1
libcaf_core/caf/inbound_path.hpp
libcaf_core/caf/inbound_path.hpp
+6
-4
libcaf_core/caf/inspector_access.hpp
libcaf_core/caf/inspector_access.hpp
+3
-3
libcaf_core/caf/intrusive/new_round_result.hpp
libcaf_core/caf/intrusive/new_round_result.hpp
+0
-1
libcaf_core/caf/ipv4_endpoint.hpp
libcaf_core/caf/ipv4_endpoint.hpp
+0
-1
libcaf_core/caf/ipv6_endpoint.hpp
libcaf_core/caf/ipv6_endpoint.hpp
+0
-1
libcaf_core/caf/mailbox_element.hpp
libcaf_core/caf/mailbox_element.hpp
+0
-2
libcaf_core/caf/memory_managed.hpp
libcaf_core/caf/memory_managed.hpp
+2
-10
libcaf_core/caf/message_id.hpp
libcaf_core/caf/message_id.hpp
+0
-1
libcaf_core/caf/meta/annotation.hpp
libcaf_core/caf/meta/annotation.hpp
+1
-2
libcaf_core/caf/meta/hex_formatted.hpp
libcaf_core/caf/meta/hex_formatted.hpp
+1
-2
libcaf_core/caf/meta/load_callback.hpp
libcaf_core/caf/meta/load_callback.hpp
+1
-3
libcaf_core/caf/meta/omittable.hpp
libcaf_core/caf/meta/omittable.hpp
+1
-3
libcaf_core/caf/meta/omittable_if_empty.hpp
libcaf_core/caf/meta/omittable_if_empty.hpp
+1
-2
libcaf_core/caf/meta/omittable_if_none.hpp
libcaf_core/caf/meta/omittable_if_none.hpp
+1
-2
libcaf_core/caf/meta/save_callback.hpp
libcaf_core/caf/meta/save_callback.hpp
+1
-3
libcaf_core/caf/meta/type_name.hpp
libcaf_core/caf/meta/type_name.hpp
+2
-2
libcaf_core/caf/outbound_path.hpp
libcaf_core/caf/outbound_path.hpp
+0
-1
libcaf_core/caf/ref_counted.hpp
libcaf_core/caf/ref_counted.hpp
+2
-3
libcaf_core/caf/serializer.hpp
libcaf_core/caf/serializer.hpp
+0
-2
libcaf_core/caf/stream.hpp
libcaf_core/caf/stream.hpp
+0
-1
libcaf_core/caf/system_messages.hpp
libcaf_core/caf/system_messages.hpp
+0
-1
libcaf_core/caf/type_id.hpp
libcaf_core/caf/type_id.hpp
+0
-1
libcaf_core/src/abstract_actor.cpp
libcaf_core/src/abstract_actor.cpp
+0
-1
libcaf_core/src/actor_control_block.cpp
libcaf_core/src/actor_control_block.cpp
+0
-1
libcaf_core/src/binary_serializer.cpp
libcaf_core/src/binary_serializer.cpp
+2
-2
libcaf_core/src/decorator/sequencer.cpp
libcaf_core/src/decorator/sequencer.cpp
+0
-2
libcaf_core/src/ref_counted.cpp
libcaf_core/src/ref_counted.cpp
+2
-7
libcaf_core/test/stateful_actor.cpp
libcaf_core/test/stateful_actor.cpp
+4
-4
libcaf_io/caf/io/accept_handle.hpp
libcaf_io/caf/io/accept_handle.hpp
+0
-3
libcaf_io/caf/io/basp/header.hpp
libcaf_io/caf/io/basp/header.hpp
+0
-2
libcaf_io/caf/io/connection_handle.hpp
libcaf_io/caf/io/connection_handle.hpp
+0
-3
libcaf_io/caf/io/datagram_handle.hpp
libcaf_io/caf/io/datagram_handle.hpp
+0
-3
libcaf_io/caf/io/network/protocol.hpp
libcaf_io/caf/io/network/protocol.hpp
+0
-1
libcaf_io/caf/io/system_messages.hpp
libcaf_io/caf/io/system_messages.hpp
+0
-2
libcaf_test/caf/test/dsl.hpp
libcaf_test/caf/test/dsl.hpp
+0
-1
manual/Actors.rst
manual/Actors.rst
+2
-2
No files found.
libcaf_core/caf/abstract_actor.hpp
View file @
639ac2ed
...
...
@@ -16,7 +16,6 @@
#include "caf/abstract_channel.hpp"
#include "caf/attachable.hpp"
#include "caf/detail/core_export.hpp"
#include "caf/detail/disposer.hpp"
#include "caf/detail/functor_attachable.hpp"
#include "caf/detail/type_traits.hpp"
#include "caf/execution_unit.hpp"
...
...
libcaf_core/caf/actor_companion.hpp
View file @
639ac2ed
...
...
@@ -8,7 +8,6 @@
#include <memory>
#include "caf/detail/core_export.hpp"
#include "caf/detail/disposer.hpp"
#include "caf/detail/shared_spinlock.hpp"
#include "caf/extend.hpp"
#include "caf/fwd.hpp"
...
...
libcaf_core/caf/detail/behavior_impl.hpp
View file @
639ac2ed
...
...
@@ -114,7 +114,7 @@ public:
template
<
size_t
...
Is
>
bool
invoke_impl
(
detail
::
invoke_result_visitor
&
f
,
message
&
msg
,
std
::
index_sequence
<
Is
...
>
)
{
auto
dispatch
=
[
&
](
auto
&
fun
)
{
[[
maybe_unused
]]
auto
dispatch
=
[
&
](
auto
&
fun
)
{
using
fun_type
=
std
::
decay_t
<
decltype
(
fun
)
>
;
using
trait
=
get_callable_trait_t
<
fun_type
>
;
auto
arg_types
=
to_type_id_list
<
typename
trait
::
decayed_arg_types
>
();
...
...
libcaf_core/caf/detail/disposer.hpp
deleted
100644 → 0
View file @
6129cc74
// This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
#pragma once
#include <type_traits>
#include "caf/memory_managed.hpp"
namespace
caf
::
detail
{
class
disposer
{
public:
void
operator
()(
memory_managed
*
ptr
)
const
noexcept
{
ptr
->
request_deletion
(
false
);
}
template
<
class
T
>
typename
std
::
enable_if
<!
std
::
is_base_of
<
memory_managed
,
T
>::
value
>::
type
operator
()(
T
*
ptr
)
const
noexcept
{
delete
ptr
;
}
};
}
// namespace caf::detail
libcaf_core/caf/detail/embedded.hpp
deleted
100644 → 0
View file @
6129cc74
// This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
#pragma once
#include "caf/intrusive_ptr.hpp"
#include "caf/ref_counted.hpp"
namespace
caf
::
detail
{
template
<
class
Base
>
class
embedded
final
:
public
Base
{
public:
template
<
class
...
Ts
>
embedded
(
intrusive_ptr
<
ref_counted
>
storage
,
Ts
&&
...
xs
)
:
Base
(
std
::
forward
<
Ts
>
(
xs
)...),
storage_
(
std
::
move
(
storage
))
{
// nop
}
~
embedded
()
{
// nop
}
void
request_deletion
(
bool
)
noexcept
override
{
intrusive_ptr
<
ref_counted
>
guard
;
guard
.
swap
(
storage_
);
// this code assumes that embedded is part of pair_storage<>,
// i.e., this object lives inside a union!
this
->~
embedded
();
}
protected:
intrusive_ptr
<
ref_counted
>
storage_
;
};
}
// namespace caf::detail
libcaf_core/caf/detail/profiled_send.hpp
View file @
639ac2ed
...
...
@@ -35,7 +35,7 @@ void profiled_send(Self* self, SelfHandle&& src, const Handle& dst,
template
<
class
Self
,
class
SelfHandle
,
class
Handle
,
class
...
Ts
>
void
profiled_send
(
Self
*
self
,
SelfHandle
&&
src
,
const
Handle
&
dst
,
actor_clock
&
clock
,
actor_clock
::
time_point
timeout
,
message_id
msg_id
,
Ts
&&
...
xs
)
{
[[
maybe_unused
]]
message_id
msg_id
,
Ts
&&
...
xs
)
{
if
(
dst
)
{
if
constexpr
(
std
::
is_same
<
Handle
,
group
>::
value
)
{
clock
.
schedule_message
(
timeout
,
dst
,
std
::
forward
<
SelfHandle
>
(
src
),
...
...
libcaf_core/caf/inbound_path.hpp
View file @
639ac2ed
...
...
@@ -15,7 +15,6 @@
#include "caf/detail/token_based_credit_controller.hpp"
#include "caf/downstream_msg.hpp"
#include "caf/logger.hpp"
#include "caf/meta/type_name.hpp"
#include "caf/settings.hpp"
#include "caf/stream_aborter.hpp"
#include "caf/stream_priority.hpp"
...
...
@@ -180,9 +179,12 @@ private:
/// @relates inbound_path
template
<
class
Inspector
>
typename
Inspector
::
return_type
inspect
(
Inspector
&
f
,
inbound_path
&
x
)
{
return
f
(
meta
::
type_name
(
"inbound_path"
),
x
.
hdl
,
x
.
slots
,
x
.
prio
,
x
.
last_acked_batch_id
,
x
.
last_batch_id
,
x
.
assigned_credit
);
bool
inspect
(
Inspector
&
f
,
inbound_path
&
x
)
{
return
f
.
object
(
x
).
fields
(
f
.
field
(
"hdl"
,
x
.
hdl
),
f
.
field
(
"slots"
,
x
.
slots
),
f
.
field
(
"prio"
,
x
.
prio
),
f
.
field
(
"last_acked_batch_id"
,
x
.
last_acked_batch_id
),
f
.
field
(
"last_batch_id"
,
x
.
last_batch_id
),
f
.
field
(
"assigned_credit"
,
x
.
assigned_credit
));
}
}
// namespace caf
libcaf_core/caf/inspector_access.hpp
View file @
639ac2ed
...
...
@@ -61,8 +61,7 @@ template <class T, class Inspector, class Obj>
class
has_static_apply
{
private:
template
<
class
U
>
static
auto
sfinae
(
Inspector
*
f
,
Obj
*
x
)
->
decltype
(
U
::
apply
(
*
f
,
*
x
),
std
::
true_type
());
static
auto
sfinae
(
Inspector
*
f
,
Obj
*
x
)
->
decltype
(
U
::
apply
(
*
f
,
*
x
));
template
<
class
U
>
static
auto
sfinae
(...)
->
std
::
false_type
;
...
...
@@ -70,7 +69,8 @@ private:
using
sfinae_type
=
decltype
(
sfinae
<
T
>
(
nullptr
,
nullptr
));
public:
static
constexpr
bool
value
=
sfinae_type
::
value
;
static
constexpr
bool
value
=
!
std
::
is_same
<
sfinae_type
,
std
::
false_type
>::
value
;
};
template
<
class
T
,
class
Inspector
,
class
Obj
>
...
...
libcaf_core/caf/intrusive/new_round_result.hpp
View file @
639ac2ed
...
...
@@ -7,7 +7,6 @@
#include <type_traits>
#include "caf/fwd.hpp"
#include "caf/meta/type_name.hpp"
namespace
caf
::
intrusive
{
...
...
libcaf_core/caf/ipv4_endpoint.hpp
View file @
639ac2ed
...
...
@@ -10,7 +10,6 @@
#include "caf/detail/comparable.hpp"
#include "caf/detail/core_export.hpp"
#include "caf/ipv4_address.hpp"
#include "caf/meta/type_name.hpp"
namespace
caf
{
...
...
libcaf_core/caf/ipv6_endpoint.hpp
View file @
639ac2ed
...
...
@@ -11,7 +11,6 @@
#include "caf/detail/core_export.hpp"
#include "caf/fwd.hpp"
#include "caf/ipv6_address.hpp"
#include "caf/meta/type_name.hpp"
namespace
caf
{
...
...
libcaf_core/caf/mailbox_element.hpp
View file @
639ac2ed
...
...
@@ -13,8 +13,6 @@
#include "caf/intrusive/singly_linked.hpp"
#include "caf/message.hpp"
#include "caf/message_id.hpp"
#include "caf/meta/omittable_if_empty.hpp"
#include "caf/meta/type_name.hpp"
#include "caf/tracing_data.hpp"
namespace
caf
{
...
...
libcaf_core/caf/memory_managed.hpp
View file @
639ac2ed
...
...
@@ -8,18 +8,10 @@
namespace
caf
{
/// This base enables derived classes to enforce a different
/// allocation strategy than new/delete by providing a virtual
/// protected `request_deletion()` function and non-public destructor.
class
[[
deprecated
]]
memory_managed
;
class
CAF_CORE_EXPORT
memory_managed
{
public:
/// Default implementations calls `delete this, but can
/// be overridden in case deletion depends on some condition or
/// the class doesn't use default new/delete.
/// @param decremented_rc Indicates whether the caller did reduce the
/// reference of this object before calling this member
/// function. This information is important when
/// implementing a type with support for weak pointers.
virtual
void
request_deletion
(
bool
decremented_rc
)
const
noexcept
;
protected:
...
...
libcaf_core/caf/message_id.hpp
View file @
639ac2ed
...
...
@@ -14,7 +14,6 @@
#include "caf/error.hpp"
#include "caf/inspector_access.hpp"
#include "caf/message_priority.hpp"
#include "caf/meta/type_name.hpp"
namespace
caf
{
...
...
libcaf_core/caf/meta/annotation.hpp
View file @
639ac2ed
...
...
@@ -8,7 +8,6 @@
namespace
caf
::
meta
{
/// Type tag for all meta annotations in CAF.
struct
annotation
{
constexpr
annotation
()
{
// nop
...
...
@@ -30,6 +29,6 @@ template <class T>
struct
is_annotation
<
T
&&>
:
is_annotation
<
T
>
{};
template
<
class
T
>
constexpr
bool
is_annotation_v
=
is_annotation
<
T
>::
value
;
[[
deprecated
]]
constexpr
bool
is_annotation_v
=
is_annotation
<
T
>::
value
;
}
// namespace caf::meta
libcaf_core/caf/meta/hex_formatted.hpp
View file @
639ac2ed
...
...
@@ -14,8 +14,7 @@ struct hex_formatted_t : annotation {
}
};
/// Advises the inspector to format the following data field in hex format.
constexpr
hex_formatted_t
hex_formatted
()
{
[[
deprecated
]]
constexpr
hex_formatted_t
hex_formatted
()
{
return
{};
}
...
...
libcaf_core/caf/meta/load_callback.hpp
View file @
639ac2ed
...
...
@@ -33,10 +33,8 @@ struct is_load_callback<load_callback_t<F>> : std::true_type {};
template
<
class
F
>
constexpr
bool
is_load_callback_v
=
is_load_callback
<
F
>::
value
;
/// Returns an annotation that allows inspectors to call
/// user-defined code after performing load operations.
template
<
class
F
>
load_callback_t
<
F
>
load_callback
(
F
fun
)
{
[[
deprecated
]]
load_callback_t
<
F
>
load_callback
(
F
fun
)
{
return
{
std
::
move
(
fun
)};
}
...
...
libcaf_core/caf/meta/omittable.hpp
View file @
639ac2ed
...
...
@@ -14,9 +14,7 @@ struct omittable_t : annotation {
}
};
/// Allows an inspector to omit the following data field
/// unconditionally when producing human-friendly output.
constexpr
omittable_t
omittable
()
{
[[
deprecated
]]
constexpr
omittable_t
omittable
()
{
return
{};
}
...
...
libcaf_core/caf/meta/omittable_if_empty.hpp
View file @
639ac2ed
...
...
@@ -14,8 +14,7 @@ struct omittable_if_empty_t : annotation {
}
};
/// Allows an inspector to omit the following data field if it is empty.
constexpr
omittable_if_empty_t
omittable_if_empty
()
{
[[
deprecated
]]
constexpr
omittable_if_empty_t
omittable_if_empty
()
{
return
{};
}
...
...
libcaf_core/caf/meta/omittable_if_none.hpp
View file @
639ac2ed
...
...
@@ -14,8 +14,7 @@ struct omittable_if_none_t : annotation {
}
};
/// Allows an inspector to omit the following data field if it is empty.
constexpr
omittable_if_none_t
omittable_if_none
()
{
[[
deprecated
]]
constexpr
omittable_if_none_t
omittable_if_none
()
{
return
{};
}
...
...
libcaf_core/caf/meta/save_callback.hpp
View file @
639ac2ed
...
...
@@ -32,10 +32,8 @@ struct is_save_callback<save_callback_t<F>> : std::true_type {};
template
<
class
F
>
constexpr
bool
is_save_callback_v
=
is_save_callback
<
F
>::
value
;
/// Returns an annotation that allows inspectors to call
/// user-defined code after performing save operations.
template
<
class
F
>
save_callback_t
<
F
>
save_callback
(
F
fun
)
{
[[
deprecated
]]
save_callback_t
<
F
>
save_callback
(
F
fun
)
{
return
{
std
::
move
(
fun
)};
}
...
...
libcaf_core/caf/meta/type_name.hpp
View file @
639ac2ed
...
...
@@ -16,8 +16,8 @@ struct type_name_t : annotation {
const
char
*
value
;
};
/// Returns a type name annotation.
type_name_t
constexpr
type_name
(
const
char
*
cstr
)
{
[[
deprecated
]]
type_name_t
constexpr
type_name
(
const
char
*
cstr
)
{
return
{
cstr
};
}
}
// namespace caf::meta
libcaf_core/caf/outbound_path.hpp
View file @
639ac2ed
...
...
@@ -15,7 +15,6 @@
#include "caf/downstream_msg.hpp"
#include "caf/fwd.hpp"
#include "caf/logger.hpp"
#include "caf/meta/type_name.hpp"
#include "caf/stream_aborter.hpp"
#include "caf/stream_slot.hpp"
#include "caf/system_messages.hpp"
...
...
libcaf_core/caf/ref_counted.hpp
View file @
639ac2ed
...
...
@@ -8,7 +8,6 @@
#include <cstddef>
#include "caf/detail/core_export.hpp"
#include "caf/memory_managed.hpp"
namespace
caf
{
...
...
@@ -16,9 +15,9 @@ namespace caf {
/// Serves the requirements of {@link intrusive_ptr}.
/// @note *All* instances of `ref_counted` start with a reference count of 1.
/// @relates intrusive_ptr
class
CAF_CORE_EXPORT
ref_counted
:
public
memory_managed
{
class
CAF_CORE_EXPORT
ref_counted
{
public:
~
ref_counted
()
override
;
virtual
~
ref_counted
()
;
ref_counted
();
ref_counted
(
const
ref_counted
&
);
...
...
libcaf_core/caf/serializer.hpp
View file @
639ac2ed
...
...
@@ -15,8 +15,6 @@
#include "caf/detail/core_export.hpp"
#include "caf/detail/squashed_int.hpp"
#include "caf/fwd.hpp"
#include "caf/meta/annotation.hpp"
#include "caf/meta/save_callback.hpp"
#include "caf/save_inspector_base.hpp"
#include "caf/sec.hpp"
#include "caf/span.hpp"
...
...
libcaf_core/caf/stream.hpp
View file @
639ac2ed
...
...
@@ -5,7 +5,6 @@
#pragma once
#include "caf/fwd.hpp"
#include "caf/meta/type_name.hpp"
#include "caf/type_id.hpp"
namespace
caf
{
...
...
libcaf_core/caf/system_messages.hpp
View file @
639ac2ed
...
...
@@ -12,7 +12,6 @@
#include "caf/deep_to_string.hpp"
#include "caf/fwd.hpp"
#include "caf/group.hpp"
#include "caf/meta/type_name.hpp"
#include "caf/stream_slot.hpp"
namespace
caf
{
...
...
libcaf_core/caf/type_id.hpp
View file @
639ac2ed
...
...
@@ -14,7 +14,6 @@
#include "caf/detail/pp.hpp"
#include "caf/detail/squashed_int.hpp"
#include "caf/fwd.hpp"
#include "caf/meta/type_name.hpp"
#include "caf/string_view.hpp"
#include "caf/timespan.hpp"
#include "caf/timestamp.hpp"
...
...
libcaf_core/src/abstract_actor.cpp
View file @
639ac2ed
...
...
@@ -17,7 +17,6 @@
#include "caf/actor_system.hpp"
#include "caf/config.hpp"
#include "caf/default_attachable.hpp"
#include "caf/detail/disposer.hpp"
#include "caf/detail/shared_spinlock.hpp"
#include "caf/execution_unit.hpp"
#include "caf/logger.hpp"
...
...
libcaf_core/src/actor_control_block.cpp
View file @
639ac2ed
...
...
@@ -6,7 +6,6 @@
#include "caf/abstract_actor.hpp"
#include "caf/actor_system.hpp"
#include "caf/detail/disposer.hpp"
#include "caf/mailbox_element.hpp"
#include "caf/message.hpp"
#include "caf/proxy_registry.hpp"
...
...
libcaf_core/src/binary_serializer.cpp
View file @
639ac2ed
...
...
@@ -66,7 +66,7 @@ constexpr size_t max_value = static_cast<size_t>(std::numeric_limits<T>::max());
bool
binary_serializer
::
begin_field
(
string_view
,
span
<
const
type_id_t
>
types
,
size_t
index
)
{
CAF_ASSERT
(
index
>=
0
&&
index
<
types
.
size
());
CAF_ASSERT
(
index
<
types
.
size
());
if
(
types
.
size
()
<
max_value
<
int8_t
>
)
{
return
value
(
static_cast
<
int8_t
>
(
index
));
}
else
if
(
types
.
size
()
<
max_value
<
int16_t
>
)
{
...
...
@@ -91,7 +91,7 @@ T compress_index(bool is_present, size_t value) {
bool
binary_serializer
::
begin_field
(
string_view
,
bool
is_present
,
span
<
const
type_id_t
>
types
,
size_t
index
)
{
CAF_ASSERT
(
!
is_present
||
(
index
>=
0
&&
index
<
types
.
size
()
));
CAF_ASSERT
(
!
is_present
||
index
<
types
.
size
(
));
if
(
types
.
size
()
<
max_value
<
int8_t
>
)
{
return
value
(
compress_index
<
int8_t
>
(
is_present
,
index
));
}
else
if
(
types
.
size
()
<
max_value
<
int16_t
>
)
{
...
...
libcaf_core/src/decorator/sequencer.cpp
View file @
639ac2ed
...
...
@@ -6,8 +6,6 @@
#include "caf/actor_system.hpp"
#include "caf/default_attachable.hpp"
#include "caf/detail/disposer.hpp"
#include "caf/detail/sync_request_bouncer.hpp"
namespace
caf
::
decorator
{
...
...
libcaf_core/src/ref_counted.cpp
View file @
639ac2ed
...
...
@@ -24,13 +24,8 @@ ref_counted& ref_counted::operator=(const ref_counted&) {
}
void
ref_counted
::
deref
()
const
noexcept
{
if
(
unique
())
{
request_deletion
(
false
);
return
;
}
if
(
rc_
.
fetch_sub
(
1
,
std
::
memory_order_acq_rel
)
==
1
)
{
request_deletion
(
true
);
}
if
(
unique
()
||
rc_
.
fetch_sub
(
1
,
std
::
memory_order_acq_rel
)
==
1
)
delete
this
;
}
}
// namespace caf
libcaf_core/test/stateful_actor.cpp
View file @
639ac2ed
...
...
@@ -17,7 +17,7 @@ using namespace std::string_literals;
namespace
{
using
typed_adder_actor
=
typed_actor
<
re
acts_to
<
add_atom
,
int
>
,
replies_to
<
get_atom
>::
with
<
int
>
>
;
=
typed_actor
<
re
sult
<
void
>
(
add_atom
,
int
),
result
<
int
>
(
get_atom
)
>
;
struct
counter
{
int
value
=
0
;
...
...
@@ -49,9 +49,9 @@ typed_adder(typed_adder_actor::stateful_pointer<counter> self) {
};
}
class
typed_adder_class
:
public
typed_adder_actor
::
stateful_
base
<
counter
>
{
class
typed_adder_class
:
public
typed_adder_actor
::
stateful_
impl
<
counter
>
{
public:
using
super
=
typed_adder_actor
::
stateful_
base
<
counter
>
;
using
super
=
typed_adder_actor
::
stateful_
impl
<
counter
>
;
typed_adder_class
(
actor_config
&
cfg
)
:
super
(
cfg
)
{
// nop
...
...
@@ -185,7 +185,7 @@ CAF_TEST(typed actors can use typed_actor_pointer as self pointer) {
[
=
](
get_atom
)
{
return
value
;
});
}
};
using
actor_type
=
typed_adder_actor
::
stateful_
base
<
state_type
>
;
using
actor_type
=
typed_adder_actor
::
stateful_
impl
<
state_type
>
;
auto
testee
=
sys
.
spawn
<
actor_type
>
(
10
);
auto
&
state
=
deref
<
actor_type
>
(
testee
).
state
;
CAF_CHECK
(
state
.
self
==
&
deref
<
actor_type
>
(
testee
));
...
...
libcaf_io/caf/io/accept_handle.hpp
View file @
639ac2ed
...
...
@@ -7,11 +7,8 @@
#include <functional>
#include "caf/error.hpp"
#include "caf/io/handle.hpp"
#include "caf/meta/type_name.hpp"
namespace
caf
::
io
{
struct
invalid_accept_handle_t
{
...
...
libcaf_io/caf/io/basp/header.hpp
View file @
639ac2ed
...
...
@@ -10,8 +10,6 @@
#include "caf/detail/io_export.hpp"
#include "caf/error.hpp"
#include "caf/io/basp/message_type.hpp"
#include "caf/meta/omittable.hpp"
#include "caf/meta/type_name.hpp"
#include "caf/node_id.hpp"
namespace
caf
::
io
::
basp
{
...
...
libcaf_io/caf/io/connection_handle.hpp
View file @
639ac2ed
...
...
@@ -7,11 +7,8 @@
#include <functional>
#include "caf/error.hpp"
#include "caf/io/handle.hpp"
#include "caf/meta/type_name.hpp"
namespace
caf
::
io
{
struct
invalid_connection_handle_t
{
...
...
libcaf_io/caf/io/datagram_handle.hpp
View file @
639ac2ed
...
...
@@ -7,11 +7,8 @@
#include <functional>
#include "caf/error.hpp"
#include "caf/io/handle.hpp"
#include "caf/meta/type_name.hpp"
namespace
caf
::
io
{
struct
invalid_datagram_handle_t
{
...
...
libcaf_io/caf/io/network/protocol.hpp
View file @
639ac2ed
...
...
@@ -8,7 +8,6 @@
#include <string>
#include "caf/detail/io_export.hpp"
#include "caf/meta/type_name.hpp"
namespace
caf
::
io
::
network
{
...
...
libcaf_io/caf/io/system_messages.hpp
View file @
639ac2ed
...
...
@@ -15,8 +15,6 @@
#include "caf/io/datagram_handle.hpp"
#include "caf/io/handle.hpp"
#include "caf/io/network/receive_buffer.hpp"
#include "caf/meta/hex_formatted.hpp"
#include "caf/meta/type_name.hpp"
namespace
caf
::
io
{
...
...
libcaf_test/caf/test/dsl.hpp
View file @
639ac2ed
...
...
@@ -12,7 +12,6 @@
#include "caf/config.hpp"
#include "caf/detail/gcd.hpp"
#include "caf/init_global_meta_objects.hpp"
#include "caf/meta/annotation.hpp"
#include "caf/test/unit_test.hpp"
CAF_PUSH_WARNINGS
...
...
manual/Actors.rst
View file @
639ac2ed
...
...
@@ -280,9 +280,9 @@ types shown below to grant access to derived types.
+------------------------+---------------------------------------------------------------+
| ``pointer`` | A pointer of type ``base*``. |
+------------------------+---------------------------------------------------------------+
| ``stateful_
base
<T>`` | See stateful-actor_. |
| ``stateful_
impl
<T>`` | See stateful-actor_. |
+------------------------+---------------------------------------------------------------+
| ``stateful_pointer<T>``| A pointer of type ``stateful_
base
<T>*``. |
| ``stateful_pointer<T>``| A pointer of type ``stateful_
impl
<T>*``. |
+------------------------+---------------------------------------------------------------+
| ``extend<Ts...>`` | Extend this typed actor with ``Ts...``. |
+------------------------+---------------------------------------------------------------+
...
...
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