X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e3a1cf8d29cef5eaf730b485da389cff9319fa56..b7b9fb781045188e65beb5c1dfc391a2d21e5472:/src/kernel/context/ContextThread.cpp diff --git a/src/kernel/context/ContextThread.cpp b/src/kernel/context/ContextThread.cpp index 17a3df7340..7914f29e76 100644 --- a/src/kernel/context/ContextThread.cpp +++ b/src/kernel/context/ContextThread.cpp @@ -34,7 +34,7 @@ ThreadContextFactory::~ThreadContextFactory() ParallelThreadContext::finalize(); } -ThreadContext* ThreadContextFactory::create_context(std::function code, smx_actor_t actor, bool maestro) +ThreadContext* ThreadContextFactory::create_context(std::function&& code, smx_actor_t actor, bool maestro) { if (parallel_) return this->new_context(std::move(code), actor, maestro); @@ -55,7 +55,7 @@ void ThreadContextFactory::run_all() // ThreadContext -ThreadContext::ThreadContext(std::function code, smx_actor_t actor, bool maestro) +ThreadContext::ThreadContext(std::function&& code, smx_actor_t actor, bool maestro) : AttachContext(std::move(code), actor), is_maestro_(maestro) { /* If the user provided a function for the actor then use it */