Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make factory_initializer a static member of ContextFactory.
[simgrid.git] / src / bindings / java / JavaContext.cpp
index 58933cf..8013b2c 100644 (file)
@@ -21,12 +21,6 @@ namespace simgrid {
 namespace kernel {
 namespace context {
 
-ContextFactory* java_factory()
-{
-  XBT_INFO("Using regular java threads.");
-  return new JavaContextFactory();
-}
-
 JavaContextFactory::JavaContextFactory() : ContextFactory()
 {
   xbt_assert(xbt::binary_name == "java");
@@ -44,7 +38,7 @@ void JavaContextFactory::run_all(std::vector<actor::ActorImpl*> const& actors)
   SerialThreadContext::run_all(actors);
 }
 
-JavaContext::JavaContext(std::function<void()>&& code, smx_actor_t actor)
+JavaContext::JavaContext(std::function<void()>&& code, actor::ActorImpl* actor)
     : SerialThreadContext(std::move(code), actor, false /* not maestro */)
 {
   /* ThreadContext already does all we need */
@@ -80,7 +74,7 @@ void JavaContext::stop()
     XBT_DEBUG("Cannot detach the current thread");
   }
 
-  throw ForcefulKillException(); // clean RAII variables with the dedicated exception
+  simgrid::ForcefulKillException::do_throw(); // clean RAII variables with the dedicated exception
 }
 
 }}} // namespace simgrid::kernel::context