A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More cleanup in contexts' stop().
[simgrid.git]
/
src
/
kernel
/
context
/
ContextRaw.cpp
diff --git
a/src/kernel/context/ContextRaw.cpp
b/src/kernel/context/ContextRaw.cpp
index
53726aa
..
244fdd4
100644
(file)
--- a/
src/kernel/context/ContextRaw.cpp
+++ b/
src/kernel/context/ContextRaw.cpp
@@
-291,8
+291,13
@@
RawContext* RawContextFactory::create_context(std::function<void()> code,
void RawContext::wrapper(void* arg)
{
RawContext* context = static_cast<RawContext*>(arg);
void RawContext::wrapper(void* arg)
{
RawContext* context = static_cast<RawContext*>(arg);
- (*context)();
- context->stop();
+ try {
+ (*context)();
+ context->Context::stop();
+ } catch (StopRequest const&) {
+ XBT_DEBUG("Caught a StopRequest");
+ }
+ context->suspend();
}
RawContext::RawContext(std::function<void()> code,
}
RawContext::RawContext(std::function<void()> code,
@@
-323,7
+328,7
@@
RawContext::~RawContext()
void RawContext::stop()
{
Context::stop();
void RawContext::stop()
{
Context::stop();
- th
is->suspend
();
+ th
row StopRequest
();
}
void RawContextFactory::run_all()
}
void RawContextFactory::run_all()