lock shared vars operations to avoid race condition
authorZhang Qiang <qiang.z.zhang@intel.com>
Sun, 18 Nov 2012 12:46:09 +0000 (20:46 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Tue, 20 Nov 2012 04:38:01 +0000 (12:38 +0800)
commit3a7dc41df2d9032da441be9f702f22804610b9f0
treef7a79caed05ee70ffdfa4d6637dd1ce79844fd2a
parentba94f7071069469ce6dae5aae0175f873142255e
lock shared vars operations to avoid race condition

Basic workflow:

Main thread:
%to_build: all packages need to be built
%order: ready packages queue
<*> scheduler to resolve ready packages in time

shared data:
@done:
@building:

threads:
* Push packages from @building to @done
* Trigger local repo update

Change-Id: Ib48b1c5225a045a8bd3017ff8e0ea656ccc72c97
depanneur