JavaContextFactory::JavaContextFactory() : ContextFactory()
{
- xbt_binary_name = xbt_strdup("java"); // Used by the backtrace displayer
+ xbt_assert(xbt_binary_name && strcmp(xbt_binary_name, "java") == 0); // Set by Java_org_simgrid_msg_Msg_init
}
JavaContextFactory::~JavaContextFactory()=default;
-JavaContext* JavaContextFactory::create_context(std::function<void()> code, void_pfn_smxprocess_t cleanup_fun,
- smx_actor_t actor)
+JavaContext* JavaContextFactory::create_context(std::function<void()>&& code, smx_actor_t actor)
{
- return this->new_context<JavaContext>(std::move(code), cleanup_fun, actor);
+ return this->new_context<JavaContext>(std::move(code), actor);
}
void JavaContextFactory::run_all()
SerialThreadContext::run_all();
}
-JavaContext::JavaContext(std::function<void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process)
- : SerialThreadContext(std::move(code), cleanup_func, process, false /* not maestro */)
+JavaContext::JavaContext(std::function<void()>&& code, smx_actor_t actor)
+ : SerialThreadContext(std::move(code), actor, false /* not maestro */)
{
/* ThreadContext already does all we need */
}