Skip to content

Commit

Permalink
Add note that pinning cases section is historical information.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfedh committed Oct 20, 2023
1 parent 997cab3 commit 6b1b858
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/src/main/asciidoc/virtual-threads.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,16 @@ According to link:{vthreadjep}[JEP 425] this can happen in two situations:
- when it executes a blocking operation inside a native method or a foreign function

It can be reasonably easy to avoid these situations in your code, but verifying every dependency you use is hard.
Typically, while experimenting with virtual threads, we realized that old versions of the link:{pgsql-driver}[postgresql-JDBC driver]
results in frequent pinning.
Typically, while experimenting with virtual threads, we realized that versions older than 42.6.0 of the link:{pgsql-driver}[postgresql-JDBC driver] result in frequent pinning.
Most JDBC drivers still pin the carrier thread.
Even worse, lots of widespread libraries are pinning and would require code changes.
Even worse, many libraries require code changes.

For more information, see link:https://quarkus.io/blog/virtual-thread-1/[When Quarkus meets Virtual Threads]

IMPORTANT: This information about pinning cases applies to PostgreSQL JDBC driver 42.5.4 and earlier.
For PostgreSQL JDBC driver 42.6.0 and later, virtually all synchronized methods have been replaced by reentrant locks.

Check warning on line 144 in docs/src/main/asciidoc/virtual-threads.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Spelling] Use correct American English spelling. Did you really mean 'reentrant'? Raw Output: {"message": "[Quarkus.Spelling] Use correct American English spelling. Did you really mean 'reentrant'?", "location": {"path": "docs/src/main/asciidoc/virtual-threads.adoc", "range": {"start": {"line": 144, "column": 103}}}, "severity": "WARNING"}
For more information, see the link:https://jdbc.postgresql.org/changelogs/2023-03-17-42.6.0-release/[Notable Changes] for PostgreSQL JDBC driver 42.6.0.

[[pooling]]
==== The pooling case
Some libraries are using `ThreadLocal` as an object pooling mechanism.
Expand Down

0 comments on commit 6b1b858

Please sign in to comment.