# [JEP 444](https://openjdk.org/jeps/444) / [JEP 491](https://openjdk.org/jeps/491) examples Sources: https://openjdk.org/jeps/444 and https://openjdk.org/jeps/491 ```java try (var executor = Executors.newVirtualThreadPerTaskExecutor()) { Future a = executor.submit(() -> fetch(uriA)); Future b = executor.submit(() -> fetch(uriB)); System.out.println(a.get() + b.get()); } ``` ```java // Use resource limits, not virtual-thread pools. Semaphore dbSlots = new Semaphore(20); Thread.startVirtualThread(() -> { dbSlots.acquireUninterruptibly(); try { queryDatabase(); } finally { dbSlots.release(); } }); ```