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
dc4cca20
Commit
dc4cca20
authored
Jan 22, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in io::broker::servant::dispose
parent
18a8a666
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
cppa/behavior_stack_based.hpp
cppa/behavior_stack_based.hpp
+4
-3
src/broker.cpp
src/broker.cpp
+4
-3
unit_testing/test_broker.cpp
unit_testing/test_broker.cpp
+1
-1
No files found.
cppa/behavior_stack_based.hpp
View file @
dc4cca20
...
@@ -188,9 +188,10 @@ class behavior_stack_based : public Base {
...
@@ -188,9 +188,10 @@ class behavior_stack_based : public Base {
}
}
inline
void
handle_timeout
(
behavior
&
bhvr
,
std
::
uint32_t
timeout_id
)
{
inline
void
handle_timeout
(
behavior
&
bhvr
,
std
::
uint32_t
timeout_id
)
{
CPPA_REQUIRE
(
m_timeout_id
==
timeout_id
);
if
(
timeout_id
==
m_timeout_id
)
{
m_has_timeout
=
false
;
m_has_timeout
=
false
;
bhvr
.
handle_timeout
();
bhvr
.
handle_timeout
();
}
}
}
protected:
protected:
...
...
src/broker.cpp
View file @
dc4cca20
...
@@ -119,11 +119,12 @@ class broker::servant : public continuable {
...
@@ -119,11 +119,12 @@ class broker::servant : public continuable {
}
}
void
dispose
()
override
{
void
dispose
()
override
{
m_broker
->
erase_io
(
read_handle
());
auto
ptr
=
m_broker
;
if
(
m_broker
->
m_io
.
empty
()
&&
m_broker
->
m_accept
.
empty
())
{
ptr
->
erase_io
(
read_handle
());
if
(
ptr
->
m_io
.
empty
()
&&
ptr
->
m_accept
.
empty
())
{
// release implicit reference count held by middleman
// release implicit reference count held by middleman
// in caes no reader/writer is left for this broker
// in caes no reader/writer is left for this broker
m_broke
r
->
deref
();
pt
r
->
deref
();
}
}
}
}
...
...
unit_testing/test_broker.cpp
View file @
dc4cca20
...
@@ -180,11 +180,11 @@ int main(int argc, char** argv) {
...
@@ -180,11 +180,11 @@ int main(int argc, char** argv) {
await_all_actors_done
();
await_all_actors_done
();
CPPA_CHECKPOINT
();
CPPA_CHECKPOINT
();
shutdown
();
shutdown
();
return
CPPA_TEST_RESULT
();
}
}
catch
(
bind_failure
&
)
{
catch
(
bind_failure
&
)
{
// try next port
// try next port
++
port
;
++
port
;
}
}
}
}
return
CPPA_TEST_RESULT
();
}
}
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