aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-12-16 20:45:34 +0100
committerJunio C Hamano <gitster@pobox.com>2007-12-16 19:26:12 -0800
commit50f22ada523f448986dd6273da14a477cea5a646 (patch)
treeb4fbc54cfcedf89407dffd16602399348e77045f /Documentation
parent3eb2a15eb385749fbfe59b4e37fc754416275760 (diff)
downloadgit-50f22ada523f448986dd6273da14a477cea5a646.tar.gz
git-50f22ada523f448986dd6273da14a477cea5a646.tar.xz
threaded pack-objects: Use condition variables for thread communication.
In the threaded pack-objects code the main thread and the worker threads must mutually signal that they have assigned a new pack of work or have completed their work, respectively. Previously, the code used mutexes that were locked in one thread and unlocked from a different thread, which is bogus (and happens to work on Linux). Here we rectify the implementation by using condition variables: There is one condition variable on which the main thread waits until a thread requests new work; and each worker thread has its own condition variable on which it waits until it is assigned new work or signaled to terminate. As a cleanup, the worker threads are spawned only after the initial work packages have been assigned. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions