Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove explicit conversion to std::string when it's not required.
[simgrid.git] / src / bindings / java / JavaContext.cpp
index c7c5168..a9ea072 100644 (file)
@@ -17,15 +17,7 @@ extern JavaVM* __java_vm;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(java, "MSG for Java(TM)");
 
-namespace simgrid {
-namespace kernel {
-namespace context {
-
-ContextFactory* java_factory()
-{
-  XBT_INFO("Using regular java threads.");
-  return new JavaContextFactory();
-}
+namespace simgrid::kernel::context {
 
 JavaContextFactory::JavaContextFactory() : ContextFactory()
 {
@@ -39,12 +31,12 @@ Context* JavaContextFactory::create_context(std::function<void()>&& code, actor:
   return this->new_context<JavaContext>(std::move(code), actor);
 }
 
-void JavaContextFactory::run_all()
+void JavaContextFactory::run_all(std::vector<actor::ActorImpl*> const& actors)
 {
-  SerialThreadContext::run_all();
+  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 +72,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
+} // namespace simgrid::kernel::context