bitbake: prserv/serv: Multithread the server
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Aug 2013 16:10:09 +0000 (16:10 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Aug 2013 23:13:22 +0000 (00:13 +0100)
commitc41d9ab29a3f4043d0853c5197c6516af70713ff
treec470cd7059d57c9aa80e4cfc33d34e04e7275046
parentd0e31db195a904dcfa356e410ca85807441c4ab1
bitbake: prserv/serv: Multithread the server

This makes the PR server multithreaded and able to handle multiple connections
at once which means its no longer a build bottle neck when serving one connection
at a time. I've experimented and database connection for each thread seems to
cause the least issues, pushing the contention for sqllite to handle itself.

This means moving the db/table connection code into the actual function methods.
It doesn't abstract well as a function since we need the db object around for
the lifetime of the function as well as the table else we lose the connection.

(Bitbake rev: bf9be2029b2bded5f532bdda4c38ae3dff5d1cf6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/prserv/serv.py