~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/multi_thread/multi_thread.cc

  • Committer: Brian Aker
  • Date: 2010-11-29 03:53:29 UTC
  • Revision ID: brian@tangent.org-20101129035329-vh5b9w73flloxwad
This extends our coverage of interrupting active threads. With no crash
capabilities in the testing framework, we can't really test for the issue
this solves,....

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
}
133
133
 
134
134
 
 
135
void MultiThreadScheduler::killSession(Session *session)
 
136
{
 
137
  boost_thread_shared_ptr thread(session->getThread());
 
138
 
 
139
  if (thread)
 
140
  {
 
141
    thread->interrupt();
 
142
  }
 
143
}
 
144
 
135
145
void MultiThreadScheduler::killSessionNow(Session::shared_ptr &session)
136
146
{
 
147
  killSession(session.get());
137
148
  /* Locks LOCK_thread_count and deletes session */
138
149
  Session::unlink(session);
139
150
  thread_count.decrement();