Change in vdsm[master]: concurrent: Add Barrier class

danken at redhat.com danken at redhat.com
Thu Jul 30 07:41:43 UTC 2015


Dan Kenigsberg has submitted this change and it was merged.

Change subject: concurrent: Add Barrier class
......................................................................


concurrent: Add Barrier class

Barrier synchronizes multiple threads. The barrier is created in closed
state, blocking all threads invoking wait(). When count threads have
entered the barrier, it is opened and all threads return from wait().

Barrier is useful for waiting until multiple threads are ready.
Currently we are synchronizing multiple threads in the tests using
time.sleep(), which make the tests slower and break randomly on
overloaded CI slaves.

Change-Id: I68525e18f6b3774d7e10af1226a7bc3404c68ae9
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/42927
Continuous-Integration: Jenkins CI
Reviewed-by: Ido Barkan <ibarkan at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/concurrent.py
M tests/concurrentTests.py
2 files changed, 228 insertions(+), 1 deletion(-)

Approvals:
  Nir Soffer: Verified
  Ido Barkan: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/42927
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I68525e18f6b3774d7e10af1226a7bc3404c68ae9
Gerrit-PatchSet: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list