| 285 | } |
| 286 | |
| 287 | Maybe<void> VirtualMachine::NotifyOrRunScheduler() { |
| 288 | if (unlikely(pthread_fork::IsForkedSubProcess() || threads_closed_ || !multi_thread_)) { |
| 289 | ScheduleUntilVMEmpty(engine_.Mutable(), SingleThreadScheduleCtx()); |
| 290 | } else { |
| 291 | pending_notifier_.Notify(); |
| 292 | } |
| 293 | return Maybe<void>::Ok(); |
| 294 | } |
| 295 | |
| 296 | Maybe<void> VirtualMachine::CloseWorkerThreads() { |
| 297 | JUST(ForEachThreadCtx(engine_.Mutable(), [&](vm::ThreadCtx* thread_ctx) -> Maybe<void> { |
nothing calls this directly
no test coverage detected