~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pool_of_threads/pool_of_threads.cc

  • Committer: Monty Taylor
  • Date: 2009-07-11 08:59:58 UTC
  • mto: (1093.1.12 captain)
  • mto: This revision was merged to the branch mainline in revision 1097.
  • Revision ID: mordred@inaugust.com-20090711085958-182jngk7bbe020q4
Removed dangerous asserts... mainly to upset Stewart.

Show diffs side-by-side

added added

removed removed

Lines of Context:
247
247
    {
248
248
      /* wake up the event loop */
249
249
      char c= 0;
250
 
      assert(write(session_add_pipe[1], &c, sizeof(c))==sizeof(c));
 
250
      size_t written= write(session_add_pipe[1], &c, sizeof(c));
 
251
      assert(written==sizeof(c));
251
252
  
252
253
      pthread_cond_wait(&COND_thread_count, &LOCK_thread_count);
253
254
    }
309
310
      later.
310
311
    */
311
312
    char c= 0;
312
 
    assert(write(session_kill_pipe[1], &c, sizeof(c))==sizeof(c));
 
313
    size_t written= write(session_kill_pipe[1], &c, sizeof(c));
 
314
    assert(written==sizeof(c));
313
315
  }
314
316
 
315
317
  virtual uint32_t count(void)
602
604
  /* queue for libevent */
603
605
  sessions_need_adding.push_front(scheduler->session);
604
606
  /* notify libevent */
605
 
  assert(write(session_add_pipe[1], &c, sizeof(c))==sizeof(c));
 
607
  size_t written= write(session_add_pipe[1], &c, sizeof(c));
 
608
  assert(written==sizeof(c));
606
609
  pthread_mutex_unlock(&LOCK_session_add);
607
610
}
608
611