~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/scheduler.h

  • Committer: Brian Aker
  • Date: 2009-01-24 04:31:39 UTC
  • Revision ID: brian@gir-3.local-20090124043139-5cu9wjefszrnyhe0
Refactored all current scheduler to be behind scheduler plugin api.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
  scheduler_functions();
46
46
};
47
47
 
48
 
enum scheduler_types
49
 
{
50
 
  SCHEDULER_POOL_OF_THREADS
51
 
};
52
 
 
53
 
void one_thread_per_connection_scheduler(scheduler_functions* func);
54
 
void one_thread_scheduler(scheduler_functions* func);
55
 
 
56
 
#define HAVE_POOL_OF_THREADS 1
57
 
 
58
 
class session_scheduler
59
 
{
60
 
public:
61
 
  bool logged_in;
62
 
  struct event* io_event;
63
 
  LIST list;
64
 
  bool thread_attached;  /* Indicates if Session is attached to the OS thread */
65
 
 
66
 
  session_scheduler();
67
 
  ~session_scheduler();
68
 
  session_scheduler(const session_scheduler&);
69
 
  void operator=(const session_scheduler&);
70
 
  bool init(Session* parent_session);
71
 
  bool thread_attach();
72
 
  void thread_detach();
73
 
};
74
 
 
75
 
void pool_of_threads_scheduler(scheduler_functions* func);
76
 
 
77
48
#endif /* DRIZZLE_SERVER_SCHEDULER_H */