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
05e60667
Commit
05e60667
authored
Jul 09, 2015
by
Marian Triebe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix segfault with `sync_send`
This segfault occurred without `then`. closes #325
parent
7ede7f2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
libcaf_core/src/local_actor.cpp
libcaf_core/src/local_actor.cpp
+1
-1
libcaf_core/test/sync_send.cpp
libcaf_core/test/sync_send.cpp
+20
-0
No files found.
libcaf_core/src/local_actor.cpp
View file @
05e60667
...
...
@@ -619,7 +619,7 @@ resumable::resume_result local_actor::resume(execution_unit* eu,
}
int
handled_msgs
=
0
;
auto
reset_timeout_if_needed
=
[
&
]
{
if
(
handled_msgs
>
0
)
{
if
(
handled_msgs
>
0
&&
has_behavior
()
)
{
request_timeout
(
get_behavior
().
timeout
());
}
};
...
...
libcaf_core/test/sync_send.cpp
View file @
05e60667
...
...
@@ -503,4 +503,24 @@ CAF_TEST(sync_send) {
);
}
behavior
snyc_send_no_then_A
(
event_based_actor
*
self
)
{
return
[
=
](
int
number
)
{
CAF_MESSAGE
(
"got "
<<
number
);
self
->
quit
();
};
}
behavior
snyc_send_no_then_B
(
event_based_actor
*
self
)
{
return
{
[
=
](
int
number
)
{
self
->
sync_send
(
self
->
spawn
(
snyc_send_no_then_A
),
number
);
self
->
quit
();
}
};
}
CAF_TEST
(
sync_send_no_then
)
{
anon_send
(
spawn
(
snyc_send_no_then_B
),
8
);
}
CAF_TEST_FIXTURE_SCOPE_END
()
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