+ void start(); // match a call to release()
+ void yield(); // match a call to yield()
+ virtual void start_hook() { /* empty placeholder, called after start(). Used in parallel mode and Java */}
+ virtual void yield_hook() { /* empty placeholder, called before yield(). Used in parallel mode */}
+ virtual void stop_hook() { /* empty placeholder, called at stop(). Used in Java */}
+
+ static void wrapper(ThreadContext* context);
+};
+
+class XBT_PUBLIC SerialThreadContext : public ThreadContext {
+public:
+ SerialThreadContext(std::function<void()>&& code, actor::ActorImpl* actor, bool maestro)
+ : ThreadContext(std::move(code), actor, maestro)
+ {
+ }
+
+ static void run_all();
+};
+
+class ParallelThreadContext : public ThreadContext {