Reorder reset and add to pool to avoid adding connections with remain…
…ing work. Utilize atomic operations to avoid set(0) at wrong time concurrently.
In my testing I found that this change had a significant impact on performance when more concurrent operations where being attempted than connections in the pool.
Thanks! I don't use this library as much anymore so I don't know when I'll be able to look real close to check for leaks or concurrency issues (I'm sure there are none). I may request a change or two on formatting/spacing (e.g. around operators, after if keyword, around lambda parameters, but not before closing parens).
Thank you for the feedback. Do you have a checkstyle that I can use to ensure I meet your formatting standards? I've eyeballed the change and it appears similar to your style.
I'm curious if you use a different driver for your postgres work or if you've simply moved to another database.
I don't have a checkstyle I'm afraid. I have left the JVM ecosystem entirely for the most part. But I still consider this to be one of the highest quality postgres drivers out there.