Browse files

Fixes synchronous start.

git-svn-id: svn://cherokee-project.com/benchmark@3508 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent 715e337 commit 69372e52d22e561f98129f84ff44cc3f26aca277 @alobbs alobbs committed Aug 4, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 main.c
View
6 main.c
@@ -216,8 +216,14 @@ thread_routine (void *me)
cb_thread_t *thread = (cb_thread_t *)me;
cb_url_t *url = (cb_url_t *)urls.next;
+ /* Wait until activated. Then, wait a sec until the rest of
+ * the its peers are ready as well.
+ */
+ pthread_mutex_lock (&thread->start_mutex);
sleep(1);
+ /* The first thread reads the time
+ */
if (time_start == 0) {
time_start = get_time_msecs();
}

0 comments on commit 69372e5

Please sign in to comment.