~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/multi_thread/multi_thread.cc

  • Committer: Andrew Hutchings
  • Date: 2010-12-06 19:36:53 UTC
  • mfrom: (1976 staging)
  • mto: This revision was merged to the branch mainline in revision 1991.
  • Revision ID: andrew@linuxjedi.co.uk-20101206193653-l85vryv18jb0yxx8
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include <drizzled/module/option_map.h>
21
21
#include <drizzled/errmsg_print.h>
22
22
#include "drizzled/session.h"
23
 
#include "drizzled/session_list.h"
 
23
#include "drizzled/session/cache.h"
24
24
 
25
25
#include <boost/thread.hpp>
26
26
#include <boost/bind.hpp>
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();