You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might be reading the source code wrongly, but it appears to me that if I do something like this:
x() ->
W = poolboy:checkout(P, true),
gen_server:call(W, Req),
poolboy:checkin(P, W).
If x dies while inside gen_server:call (can it actually do that?), then W is returned to the pool, but it's still busy. That means that when someone checks it out later, their gen_server:call will be queued behind this one.
Is there any way to get around this?
The text was updated successfully, but these errors were encountered:
Well, that's a good question. Sometimes yes, sometimes no. In our particular case, usually no. Either the write is not that important, or it's a read, in which case it's wasted.
I might be reading the source code wrongly, but it appears to me that if I do something like this:
If
x
dies while insidegen_server:call
(can it actually do that?), thenW
is returned to the pool, but it's still busy. That means that when someone checks it out later, theirgen_server:call
will be queued behind this one.Is there any way to get around this?
The text was updated successfully, but these errors were encountered: