Handle concurrent finishing of the same build

There is a slight possibility that the queue monitor and a builder
thread simultaneously decide to mark a build as finished. That's fine,
as long as we ensure the DB update is idempotent (as ensured by doing
"update Builds set finished = 1 ... where finished = 0").
This commit is contained in:
Eelco Dolstra
2015-06-18 17:12:51 +02:00
parent 948473c909
commit 9cdbff2fdf
2 changed files with 35 additions and 29 deletions

View File

@@ -28,6 +28,9 @@ private:
public:
Sync() { }
Sync(const T & data) : data(data) { }
class Lock
{
private: