Commit d1119de5 authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

[server] use a LifoQueue in _CnxSetPool

In postgresql, some cache is attached to the connection. Using a LifoQueue
(last-in, first-out) makes a few connections to get the most load which give
best performance.
parent bbcab4655261
......@@ -181,7 +181,7 @@ class _CnxSetPool(_BaseCnxSet):
def __init__(self, source, size):
super().__init__(source)
self._cnxsets = []
self._queue = queue.Queue()
self._queue = queue.LifoQueue()
for i in range(size):
self._queue.put_nowait(self._new_cnxset())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment