db: fair attribution of Connections
db: fair attribution of Connections

This changes the logic of the pool into a true FIFO behavior: if there are already waiters, a thread will just wait and not preempt the waiters, unless it came there after resuming from a wait, in which case it should always get the connection.

Fixes #9111.


git-svn-id: 7bda06b145a4a8e9a7f4be07d7c3eb82923a12d6@10002 af82e41b-90c4-0310-8c96-b1721e28e2e2

jun66j5/trac-ja,netjunki/trac-Pygit2,jun66j5/trac-ja,walty8/trac,walty8/trac,netjunki/trac-Pygit2,netjunki/trac-Pygit2,jun66j5/trac-ja,walty8/trac,jun66j5/trac-ja,walty8/trac