~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/multi_thread/multi_thread.cc

  • Committer: Monty Taylor
  • Date: 2010-01-02 23:27:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1261.
  • Revision ID: mordred@inaugust.com-20100102232700-9rjekbaynol3o9mi
Replaced operator overloads with methods since we can't actually usefully follow the proper semantics for the operators.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
  if (thread_count >= max_threads)
52
52
    return true;
53
53
 
54
 
  thread_count++;
 
54
  thread_count.increment();
55
55
 
56
56
  if (pthread_create(&session->real_id, &attr, session_thread,
57
57
                     static_cast<void*>(session)))
58
58
  {
59
 
    thread_count--;
 
59
    thread_count.decrement();
60
60
    return true;
61
61
  }
62
62
 
68
68
{
69
69
  /* Locks LOCK_thread_count and deletes session */
70
70
  Session::unlink(session);
71
 
  thread_count--;
 
71
  thread_count.decrement();
72
72
  my_thread_end();
73
73
  pthread_exit(0);
74
74
  /* We should never reach this point. */