Skip to content

Commit

Permalink
#10569 prototype leak-resistant concurrent pool
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
  • Loading branch information
lorban committed Sep 27, 2023
1 parent 5e5a5c5 commit feb8af9
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,14 @@ public boolean enable(E pooled, boolean acquire)
@Override
public E getPooled()
{
this.pooled = null;
return weakPooled == null ? null : weakPooled.get();
try
{
return weakPooled == null ? null : weakPooled.get();
}
finally
{
this.pooled = null;
}
}

@Override
Expand Down

0 comments on commit feb8af9

Please sign in to comment.