drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
multi_thread.h
1
/* Copyright (C) 2009 Sun Microsystems, Inc.
2
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
11
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15
16
#pragma once
17
18
#include <drizzled/atomics.h>
19
#include <drizzled/gettext.h>
20
#include <drizzled/error.h>
21
#include <drizzled/plugin/scheduler.h>
22
#include <drizzled/internal/my_sys.h>
23
#include <drizzled/sql_parse.h>
24
#include <string>
25
26
namespace
multi_thread {
27
28
class
MultiThreadScheduler:
public
drizzled::plugin::Scheduler
29
{
30
private
:
31
drizzled::atomic<uint32_t> thread_count;
32
33
public
:
34
MultiThreadScheduler(
const
char
*name_arg):
35
Scheduler(name_arg)
36
{
37
setStackSize();
38
thread_count= 0;
39
}
40
41
~MultiThreadScheduler();
42
bool
addSession
(
const
drizzled::Session::shared_ptr&);
43
void
killSessionNow
(
const
drizzled::Session::shared_ptr&);
44
void
killSession
(
drizzled::Session
*);
45
46
void
runSession(drizzled::session_id_t);
47
private
:
48
void
setStackSize();
49
};
50
51
}
// namespace multi_thread
52
drizzled::Session
Definition
session.h:82
drizzled::plugin::Scheduler
Definition
scheduler.h:36
multi_thread::MultiThreadScheduler::killSession
void killSession(drizzled::Session *)
Definition
multi_thread.cc:139
multi_thread::MultiThreadScheduler::addSession
bool addSession(const drizzled::Session::shared_ptr &)
Definition
multi_thread.cc:107
multi_thread::MultiThreadScheduler::killSessionNow
void killSessionNow(const drizzled::Session::shared_ptr &)
Definition
multi_thread.cc:149
← Back to Drizzle docs
plugin
multi_thread
multi_thread.h
Generated by
1.15.0