github/Akavache — pull request #66 by xpaulbettsx (2013-08-26 17:53:10+00:00)
Title: Fix parallel usage of Akavache SQLite3 connections

Previously, we were incorrectly reusing SQLite connections on parallel threads, which is Bad™ at best (depending on the version of SQLite you have, it will be more or less tolerant of this). The logic that was existing in this code was based on blocking threads and didn't really work.

Instead, we rewrite the connection pool here:
* Create 'n' connections (currently hardcoded at 6)
* Round-robin between them
* Use `KeyedOperationQueue` with the selected index as the key (meaning, we will asynchronously queue up items to be sent down on a per-connection basis)