Commits
Tarun Sukhani authored ff872f198cf
chore(utils): delete ExecutorFacade Step 3/5 toward VT-only. With VT execution unconditional, the dual-mode dispatch facade has nothing to dispatch between. Invoker.scheduler and JobsPlugin.scheduler change type from ExecutorFacade to VirtualThreadScheduledExecutor (volatile field, assigned by init/start, nulled by stop) and callers invoke its methods directly. API changes: - Invoker.scheduler / JobsPlugin.scheduler: ExecutorFacade -> VTScheduledExecutor - VTScheduledExecutor gains shutdownGracefully(long timeoutMs) — ported from the deleted ExecutorFacade so JobsPlugin.onApplicationStop keeps the same drain semantics. - Job.executor identity comparison: was scheduler.platformExecutor() / virtualExecutor(); now scheduler directly. Removed: - framework/src/play/utils/ExecutorFacade.java - framework/test-src/play/utils/ExecutorFacadeTest.java - The if-isUsingVirtualThreads / platformExecutor() branches in Invoker.invoke / Invoker.invoke(millis) / Invoker.resetClassloaders (resetClassloaders becomes a no-op under VT-only — VTs aren't enumerable and each one sets its CL freshly per task). - WaitForTasksCompletion's polling thread + Map<Future, Invocation> queue (the legacy 50ms-scan loop). The VT-block-and-resume path is the only path now; no instance, no run() method, no queue field. The class retains the static waitFor() entry point as a logical grouping. - Unused imports: PThreadFactory and the now-orphan java.util.concurrent classes from Invoker. Test fixups: - InvokerVirtualThreadTest, VirtualThreadIntegrationTest, JobsPluginVirtualThreadTest: facade-API assertions (isUsingVirtualThreads, platformExecutor, virtualExecutor) replaced with `scheduler != null`. ant test passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>