~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pool_of_threads/pool_of_threads.cc

  • Committer: Brian Aker
  • Date: 2009-01-24 13:22:10 UTC
  • Revision ID: brian@gir-3.local-20090124132210-kdoac6t6ztyp3crc
Move number of threads to use for pool of threads to module. Removed slave
thrad cheats from session object.

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
  created_threads= killed_threads= 0;
132
132
  pthread_mutex_lock(&LOCK_thread_count);
133
133
 
134
 
  for (i= 0; i < thread_pool_size; i++)
 
134
  for (i= 0; i < size; i++)
135
135
  {
136
136
    pthread_t thread;
137
137
    int error;
147
147
  }
148
148
 
149
149
  /* Wait until all threads are created */
150
 
  while (created_threads != thread_pool_size)
 
150
  while (created_threads != size)
151
151
    pthread_cond_wait(&COND_thread_count,&LOCK_thread_count);
152
152
  pthread_mutex_unlock(&LOCK_thread_count);
153
153
 
386
386
  */
387
387
  (void) pthread_mutex_lock(&LOCK_thread_count);
388
388
  created_threads++;
389
 
  if (created_threads == thread_pool_size)
 
389
  if (created_threads == size)
390
390
    (void) pthread_cond_signal(&COND_thread_count);
391
391
  (void) pthread_mutex_unlock(&LOCK_thread_count);
392
392