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
ebc7bef1
Commit
ebc7bef1
authored
Jun 06, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `invalidate => destroy`, relates #468
parent
56e41930
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
18 additions
and
18 deletions
+18
-18
libcaf_core/caf/abstract_actor.hpp
libcaf_core/caf/abstract_actor.hpp
+1
-1
libcaf_core/caf/actor.hpp
libcaf_core/caf/actor.hpp
+1
-1
libcaf_core/caf/actor_addr.hpp
libcaf_core/caf/actor_addr.hpp
+1
-1
libcaf_core/caf/actor_storage.hpp
libcaf_core/caf/actor_storage.hpp
+1
-1
libcaf_core/caf/local_actor.hpp
libcaf_core/caf/local_actor.hpp
+1
-1
libcaf_core/caf/typed_actor.hpp
libcaf_core/caf/typed_actor.hpp
+1
-1
libcaf_core/src/abstract_actor.cpp
libcaf_core/src/abstract_actor.cpp
+1
-1
libcaf_core/src/group_manager.cpp
libcaf_core/src/group_manager.cpp
+3
-3
libcaf_core/src/local_actor.cpp
libcaf_core/src/local_actor.cpp
+2
-2
libcaf_core/test/constructor_attach.cpp
libcaf_core/test/constructor_attach.cpp
+1
-1
libcaf_core/test/dynamic_spawn.cpp
libcaf_core/test/dynamic_spawn.cpp
+2
-2
libcaf_io/src/middleman.cpp
libcaf_io/src/middleman.cpp
+1
-1
libcaf_io/src/middleman_actor.cpp
libcaf_io/src/middleman_actor.cpp
+1
-1
libcaf_io/test/unpublish.cpp
libcaf_io/test/unpublish.cpp
+1
-1
No files found.
libcaf_core/caf/abstract_actor.hpp
View file @
ebc7bef1
...
@@ -68,7 +68,7 @@ public:
...
@@ -68,7 +68,7 @@ public:
/// in sub classes before destroying the object, because calling
/// in sub classes before destroying the object, because calling
/// virtual function in the destructor itself is not safe. Any override
/// virtual function in the destructor itself is not safe. Any override
/// implementation is required to call `super::destroy()` at the end.
/// implementation is required to call `super::destroy()` at the end.
virtual
void
destroy
();
virtual
void
on_
destroy
();
void
enqueue
(
strong_actor_ptr
sender
,
message_id
mid
,
void
enqueue
(
strong_actor_ptr
sender
,
message_id
mid
,
message
content
,
execution_unit
*
host
)
override
;
message
content
,
execution_unit
*
host
)
override
;
...
...
libcaf_core/caf/actor.hpp
View file @
ebc7bef1
...
@@ -177,7 +177,7 @@ public:
...
@@ -177,7 +177,7 @@ public:
/// Releases the reference held by handle `x`. Using the
/// Releases the reference held by handle `x`. Using the
/// handle after invalidating it is undefined behavior.
/// handle after invalidating it is undefined behavior.
friend
void
invalidate
(
actor
&
x
)
{
friend
void
destroy
(
actor
&
x
)
{
x
.
ptr_
.
reset
();
x
.
ptr_
.
reset
();
}
}
...
...
libcaf_core/caf/actor_addr.hpp
View file @
ebc7bef1
...
@@ -120,7 +120,7 @@ public:
...
@@ -120,7 +120,7 @@ public:
/// Releases the reference held by handle `x`. Using the
/// Releases the reference held by handle `x`. Using the
/// handle after invalidating it is undefined behavior.
/// handle after invalidating it is undefined behavior.
friend
void
invalidate
(
actor_addr
&
x
)
{
friend
void
destroy
(
actor_addr
&
x
)
{
x
.
ptr_
.
reset
();
x
.
ptr_
.
reset
();
}
}
...
...
libcaf_core/caf/actor_storage.hpp
View file @
ebc7bef1
...
@@ -81,7 +81,7 @@ public:
...
@@ -81,7 +81,7 @@ public:
private:
private:
static
void
data_dtor
(
abstract_actor
*
ptr
)
{
static
void
data_dtor
(
abstract_actor
*
ptr
)
{
// safe due to static assert #3
// safe due to static assert #3
ptr
->
destroy
();
ptr
->
on_
destroy
();
static_cast
<
T
*>
(
ptr
)
->~
T
();
static_cast
<
T
*>
(
ptr
)
->~
T
();
}
}
...
...
libcaf_core/caf/local_actor.hpp
View file @
ebc7bef1
...
@@ -131,7 +131,7 @@ public:
...
@@ -131,7 +131,7 @@ public:
~
local_actor
();
~
local_actor
();
void
destroy
()
override
;
void
on_
destroy
()
override
;
// -- spawn functions --------------------------------------------------------
// -- spawn functions --------------------------------------------------------
...
...
libcaf_core/caf/typed_actor.hpp
View file @
ebc7bef1
...
@@ -252,7 +252,7 @@ class typed_actor : detail::comparable<typed_actor<Sigs...>>,
...
@@ -252,7 +252,7 @@ class typed_actor : detail::comparable<typed_actor<Sigs...>>,
/// Releases the reference held by handle `x`. Using the
/// Releases the reference held by handle `x`. Using the
/// handle after invalidating it is undefined behavior.
/// handle after invalidating it is undefined behavior.
friend
void
invalidate
(
typed_actor
&
x
)
{
friend
void
destroy
(
typed_actor
&
x
)
{
x
.
ptr_
.
reset
();
x
.
ptr_
.
reset
();
}
}
...
...
libcaf_core/src/abstract_actor.cpp
View file @
ebc7bef1
...
@@ -54,7 +54,7 @@ abstract_actor::~abstract_actor() {
...
@@ -54,7 +54,7 @@ abstract_actor::~abstract_actor() {
// nop
// nop
}
}
void
abstract_actor
::
destroy
()
{
void
abstract_actor
::
on_
destroy
()
{
// nop
// nop
}
}
...
...
libcaf_core/src/group_manager.cpp
View file @
ebc7bef1
...
@@ -281,9 +281,9 @@ public:
...
@@ -281,9 +281,9 @@ public:
void
stop
()
override
{
void
stop
()
override
{
CAF_LOG_TRACE
(
""
);
CAF_LOG_TRACE
(
""
);
await_all_locals_down
(
system_
,
{
monitor_
,
proxy_broker_
,
broker_
});
await_all_locals_down
(
system_
,
{
monitor_
,
proxy_broker_
,
broker_
});
invalidate
(
monitor_
);
destroy
(
monitor_
);
invalidate
(
proxy_broker_
);
destroy
(
proxy_broker_
);
invalidate
(
broker_
);
destroy
(
broker_
);
}
}
private:
private:
...
...
libcaf_core/src/local_actor.cpp
View file @
ebc7bef1
...
@@ -206,12 +206,12 @@ local_actor::~local_actor() {
...
@@ -206,12 +206,12 @@ local_actor::~local_actor() {
private_thread_
->
notify_self_destroyed
();
private_thread_
->
notify_self_destroyed
();
}
}
void
local_actor
::
destroy
()
{
void
local_actor
::
on_
destroy
()
{
CAF_LOG_TRACE
(
CAF_ARG
(
is_terminated
()));
CAF_LOG_TRACE
(
CAF_ARG
(
is_terminated
()));
if
(
!
is_cleaned_up
())
{
if
(
!
is_cleaned_up
())
{
on_exit
();
on_exit
();
cleanup
(
exit_reason
::
unreachable
,
nullptr
);
cleanup
(
exit_reason
::
unreachable
,
nullptr
);
monitorable_actor
::
destroy
();
monitorable_actor
::
on_
destroy
();
}
}
}
}
...
...
libcaf_core/test/constructor_attach.cpp
View file @
ebc7bef1
...
@@ -79,7 +79,7 @@ CAF_TEST(constructor_attach) {
...
@@ -79,7 +79,7 @@ CAF_TEST(constructor_attach) {
}
}
void
on_exit
()
{
void
on_exit
()
{
invalidate
(
testee_
);
destroy
(
testee_
);
}
}
private:
private:
...
...
libcaf_core/test/dynamic_spawn.cpp
View file @
ebc7bef1
...
@@ -514,7 +514,7 @@ CAF_TEST(constructor_attach) {
...
@@ -514,7 +514,7 @@ CAF_TEST(constructor_attach) {
}
}
void
on_exit
()
{
void
on_exit
()
{
invalidate
(
buddy_
);
destroy
(
buddy_
);
}
}
private:
private:
...
@@ -548,7 +548,7 @@ CAF_TEST(constructor_attach) {
...
@@ -548,7 +548,7 @@ CAF_TEST(constructor_attach) {
void
on_exit
()
{
void
on_exit
()
{
CAF_MESSAGE
(
"spawner::on_exit()"
);
CAF_MESSAGE
(
"spawner::on_exit()"
);
invalidate
(
testee_
);
destroy
(
testee_
);
}
}
private:
private:
...
...
libcaf_io/src/middleman.cpp
View file @
ebc7bef1
...
@@ -313,7 +313,7 @@ void middleman::stop() {
...
@@ -313,7 +313,7 @@ void middleman::stop() {
scoped_actor
self
{
system
(),
true
};
scoped_actor
self
{
system
(),
true
};
self
->
send_exit
(
manager_
,
exit_reason
::
user_shutdown
);
self
->
send_exit
(
manager_
,
exit_reason
::
user_shutdown
);
self
->
wait_for
(
manager_
);
self
->
wait_for
(
manager_
);
invalidate
(
manager_
);
destroy
(
manager_
);
}
}
void
middleman
::
init
(
actor_system_config
&
cfg
)
{
void
middleman
::
init
(
actor_system_config
&
cfg
)
{
...
...
libcaf_io/src/middleman_actor.cpp
View file @
ebc7bef1
...
@@ -61,7 +61,7 @@ public:
...
@@ -61,7 +61,7 @@ public:
void
on_exit
()
override
{
void
on_exit
()
override
{
CAF_LOG_TRACE
(
""
);
CAF_LOG_TRACE
(
""
);
invalidate
(
broker_
);
destroy
(
broker_
);
}
}
const
char
*
name
()
const
override
{
const
char
*
name
()
const
override
{
...
...
libcaf_io/test/unpublish.cpp
View file @
ebc7bef1
...
@@ -65,7 +65,7 @@ struct fixture {
...
@@ -65,7 +65,7 @@ struct fixture {
~
fixture
()
{
~
fixture
()
{
anon_send_exit
(
testee
,
exit_reason
::
user_shutdown
);
anon_send_exit
(
testee
,
exit_reason
::
user_shutdown
);
invalidate
(
testee
);
destroy
(
testee
);
system
.
~
actor_system
();
system
.
~
actor_system
();
CAF_CHECK_EQUAL
(
s_dtor_called
.
load
(),
2
);
CAF_CHECK_EQUAL
(
s_dtor_called
.
load
(),
2
);
}
}
...
...
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