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
acedc6fc
Commit
acedc6fc
authored
Jul 17, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicate for mailbox_based
parent
870a3304
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
73 deletions
+2
-73
caf/actor_companion.hpp
caf/actor_companion.hpp
+2
-3
caf/mailbox_based.hpp
caf/mailbox_based.hpp
+0
-70
No files found.
caf/actor_companion.hpp
View file @
acedc6fc
...
@@ -23,11 +23,10 @@
...
@@ -23,11 +23,10 @@
#include <functional>
#include <functional>
#include "caf/local_actor.hpp"
#include "caf/local_actor.hpp"
#include "caf/mailbox_based.hpp"
#include "caf/mailbox_element.hpp"
#include "caf/mailbox_element.hpp"
#include "caf/behavior_stack_based.hpp"
#include "caf/mixin/sync_sender.hpp"
#include "caf/mixin/sync_sender.hpp"
#include "caf/mixin/behavior_stack_based.hpp"
#include "caf/detail/memory.hpp"
#include "caf/detail/memory.hpp"
#include "caf/detail/shared_spinlock.hpp"
#include "caf/detail/shared_spinlock.hpp"
...
@@ -40,7 +39,7 @@ namespace caf {
...
@@ -40,7 +39,7 @@ namespace caf {
* allow any object to interact with other actors.
* allow any object to interact with other actors.
*/
*/
class
actor_companion
:
public
extend
<
local_actor
,
actor_companion
>::
class
actor_companion
:
public
extend
<
local_actor
,
actor_companion
>::
with
<
behavior_stack_based
<
behavior
>::
impl
,
with
<
mixin
::
behavior_stack_based
<
behavior
>::
impl
,
mixin
::
sync_sender
<
nonblocking_response_handle_tag
>::
impl
>
{
mixin
::
sync_sender
<
nonblocking_response_handle_tag
>::
impl
>
{
using
lock_type
=
detail
::
shared_spinlock
;
using
lock_type
=
detail
::
shared_spinlock
;
...
...
caf/mailbox_based.hpp
deleted
100644 → 0
View file @
870a3304
/******************************************************************************\
* ___ __ *
* /\_ \ __/\ \ *
* \//\ \ /\_\ \ \____ ___ _____ _____ __ *
* \ \ \ \/\ \ \ '__`\ /'___\/\ '__`\/\ '__`\ /'__`\ *
* \_\ \_\ \ \ \ \L\ \/\ \__/\ \ \L\ \ \ \L\ \/\ \L\.\_ *
* /\____\\ \_\ \_,__/\ \____\\ \ ,__/\ \ ,__/\ \__/.\_\ *
* \/____/ \/_/\/___/ \/____/ \ \ \/ \ \ \/ \/__/\/_/ *
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011 - 2014 *
* Dominik Charousset <dominik.charousset (at) haw-hamburg.de> *
* *
* Distributed under the Boost Software License, Version 1.0. See *
* accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt *
\******************************************************************************/
#ifndef CAF_MAILBOX_BASED_HPP
#define CAF_MAILBOX_BASED_HPP
#include <type_traits>
#include "caf/mailbox_element.hpp"
#include "caf/detail/sync_request_bouncer.hpp"
#include "caf/detail/single_reader_queue.hpp"
namespace
caf
{
template
<
class
Base
,
class
Subtype
>
class
mailbox_based
:
public
Base
{
using
del
=
detail
::
disposer
;
public:
~
mailbox_based
()
{
if
(
!
m_mailbox
.
closed
())
{
detail
::
sync_request_bouncer
f
{
this
->
exit_reason
()};
m_mailbox
.
close
(
f
);
}
}
template
<
typename
...
Ts
>
inline
mailbox_element
*
new_mailbox_element
(
Ts
&&
...
args
)
{
return
mailbox_element
::
create
(
std
::
forward
<
Ts
>
(
args
)...);
}
void
cleanup
(
std
::
uint32_t
reason
)
override
{
detail
::
sync_request_bouncer
f
{
reason
};
m_mailbox
.
close
(
f
);
Base
::
cleanup
(
reason
);
}
protected:
using
combined_type
=
mailbox_based
;
using
mailbox_type
=
detail
::
single_reader_queue
<
mailbox_element
,
del
>
;
template
<
typename
...
Ts
>
mailbox_based
(
Ts
&&
...
args
)
:
Base
(
std
::
forward
<
Ts
>
(
args
)...)
{
}
mailbox_type
m_mailbox
;
};
}
// namespace caf
#endif //CAF_MAILBOX_BASED_HPP
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