~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2009-02-09 19:57:15 UTC
  • Revision ID: brian@tangent.org-20090209195715-wonyzfy98zk7xfdo
Fix for weird lock/unlock on broadcast.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1517
1517
    after which we signal it that we are ready.
1518
1518
    At this pointer there is no other threads running, so there
1519
1519
    should not be any other pthread_cond_signal() calls.
 
1520
 
 
1521
    We call lock/unlock to out wait any thread/session which is
 
1522
    dieing. Since only comes from this code, this should be safe.
 
1523
    (Asked MontyW over the phone about this.) -Brian
 
1524
 
1520
1525
  */
 
1526
  if (pthread_mutex_lock(&LOCK_thread_count) == 0)
 
1527
    (void) pthread_mutex_unlock(&LOCK_thread_count);
1521
1528
  (void) pthread_cond_broadcast(&COND_thread_count);
1522
1529
 
1523
1530
  (void) pthread_sigmask(SIG_BLOCK,&set,NULL);