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
a15df24a
Commit
a15df24a
authored
Jun 18, 2013
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed memory mgmnt for IO actors
parent
a434453d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
src/io_actor.cpp
src/io_actor.cpp
+5
-4
src/io_actor_backend.cpp
src/io_actor_backend.cpp
+0
-3
src/middleman.cpp
src/middleman.cpp
+1
-1
No files found.
src/io_actor.cpp
View file @
a15df24a
...
...
@@ -46,14 +46,14 @@ class io_actor_continuation {
io_actor_continuation
(
io_actor_ptr
ptr
,
mailbox_element
*
elem
)
:
m_self
(
std
::
move
(
ptr
)),
m_elem
(
elem
)
{
}
void
operator
()()
const
{
inline
void
operator
()()
const
{
m_self
->
invoke_message
(
m_elem
);
}
private:
i
ntrusive_ptr
<
io_actor
>
m_self
;
mailbox_element
*
m_elem
;
i
o_actor_ptr
m_self
;
mailbox_element
*
m_elem
;
};
...
...
@@ -63,7 +63,7 @@ class default_io_actor_impl : public io_actor {
typedef
std
::
function
<
void
(
io_service
*
)
>
function_type
;
default_io_actor_impl
(
function_type
fun
)
:
m_fun
(
std
::
move
(
fun
))
{
}
default_io_actor_impl
(
function_type
&&
fun
)
:
m_fun
(
std
::
move
(
fun
))
{
}
void
init
()
override
{
m_fun
(
&
io_handle
());
...
...
@@ -102,6 +102,7 @@ void io_actor::invoke_message(mailbox_element* elem) {
}
if
(
exit_reason
()
!=
exit_reason
::
not_exited
)
{
get_actor_registry
()
->
dec_running
();
m_parent
.
reset
();
}
}
...
...
src/io_actor_backend.cpp
View file @
a15df24a
...
...
@@ -28,8 +28,6 @@
\******************************************************************************/
#include <iostream>
#include "cppa/singletons.hpp"
#include "cppa/network/middleman.hpp"
...
...
@@ -53,7 +51,6 @@ io_actor_backend::io_actor_backend(input_stream_ptr in,
}
io_actor_backend
::~
io_actor_backend
()
{
std
::
cout
<<
"~io_actor_backend"
<<
std
::
endl
;
handle_disconnect
();
}
...
...
src/middleman.cpp
View file @
a15df24a
...
...
@@ -75,7 +75,7 @@ class middleman_event {
public:
template
<
typename
Arg
>
middleman_event
(
Arg
&&
arg
)
:
next
(
0
),
fun
(
forward
<
Arg
>
(
arg
))
{
}
middleman_event
(
Arg
&&
arg
)
:
next
(
nullptr
),
fun
(
forward
<
Arg
>
(
arg
))
{
}
inline
void
operator
()()
{
fun
();
}
...
...
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