~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/scheduler.h

  • Committer: Patrick Crews
  • Date: 2010-08-17 16:41:12 UTC
  • mfrom: (1711.6.2 staging)
  • mto: This revision was merged to the branch mainline in revision 1714.
  • Revision ID: gleebix@gmail.com-20100817164112-vaa55iprokbg6m1k
Merge Brian's recursive mutex removal tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#ifndef DRIZZLED_PLUGIN_SCHEDULER_H
23
23
#define DRIZZLED_PLUGIN_SCHEDULER_H
24
24
 
25
 
#include "drizzled/session.h"
26
25
#include "drizzled/plugin/plugin.h"
27
26
 
28
27
#include <string>
30
29
 
31
30
namespace drizzled
32
31
{
33
 
 
34
32
class Session;
35
33
 
36
34
namespace plugin
56
54
   * Add a session to the scheduler. When the scheduler is ready to run the
57
55
   * session, it should call session->run().
58
56
   */
59
 
  virtual bool addSession(Session::shared_ptr &session)= 0;
 
57
  virtual bool addSession(Session *session)= 0;
60
58
 
61
59
  /**
62
60
   * Notify the scheduler that it should be killed gracefully.
66
64
  /**
67
65
   * This is called when a scheduler should kill the session immedaitely.
68
66
   */
69
 
  virtual void killSessionNow(Session::shared_ptr&) {}
 
67
  virtual void killSessionNow(Session *) {}
70
68
 
71
69
  static bool addPlugin(plugin::Scheduler *sced);
72
70
  static void removePlugin(plugin::Scheduler *sced);
73
71
  static bool setPlugin(const std::string& name);
74
72
  static Scheduler *getScheduler();
 
73
 
 
74
  /**
 
75
   * Return the thread stack size that should be used for all threads.
 
76
   */
 
77
  size_t getThreadStackSize() const;
 
78
 
75
79
};
76
80
 
77
81
} /* namespace plugin */