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
9edcd6e1
Commit
9edcd6e1
authored
Aug 22, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix possible issue w/ exception in no_resume
parent
836a3874
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
libcaf_core/caf/policy/no_resume.hpp
libcaf_core/caf/policy/no_resume.hpp
+12
-8
No files found.
libcaf_core/caf/policy/no_resume.hpp
View file @
9edcd6e1
...
...
@@ -29,21 +29,25 @@ class no_resume {
}
resumable
::
resume_result
resume
(
execution_unit
*
,
size_t
)
{
auto
done_cb
=
[
=
](
uint32_t
reason
)
{
this
->
planned_exit_reason
(
reason
);
this
->
on_exit
();
this
->
cleanup
(
reason
);
};
uint32_t
rsn
=
exit_reason
::
normal
;
try
{
this
->
act
();
done_cb
(
exit_reason
::
normal
);
}
catch
(
actor_exited
&
e
)
{
done_cb
(
e
.
reason
());
rsn
=
e
.
reason
();
}
catch
(...)
{
rsn
=
exit_reason
::
unhandled_exception
;
}
this
->
planned_exit_reason
(
rsn
);
try
{
this
->
on_exit
();
}
catch
(...)
{
done_cb
(
exit_reason
::
unhandled_exception
);
// simply ignore exception
}
// exit reason might have been changed by on_exit()
this
->
cleanup
(
this
->
planned_exit_reason
());
return
resumable
::
done
;
}
...
...
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