<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br>
    It's possible this topic will come up many times. I wonder if anyone
    with experience in this area would have time to do an inventory of
    the JDBC drivers and the DB connection pools to see how they behave
    with virtual threads.  Oracle's JDBC driver, PostgreSQL JDBC driver,
    and a few others have JDBC drivers that work well with virtual
    threads but I have seen much on DB connection libraries. Do they
    provide API that wait for a connection to be available without
    pinning a virtual thread?<br><br></div></blockquote><div><br></div><div>To be honest, I haven't actually tested with virtual threads, but dbcp2 relies on Apache Commons Pool2 which uses `GenericObjectPool` [1] for pooling which uses `LinkedBlockingDeque` itself (no synchronized blocks or native shenanigans), so I would expect it work well with Loom. Anyway, I can write some tests on how well behaved these pools (with various configurations) with Loom on the weekend.</div><div><br></div><div>[1]: <a href="https://github.com/apache/commons-pool/blob/rel/commons-pool-2.11.1/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java">https://github.com/apache/commons-pool/blob/rel/commons-pool-2.11.1/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java</a></div><div> </div></div></div>