~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pool_of_threads/pool_of_threads.cc

  • Committer: Brian Aker
  • Date: 2009-02-10 00:14:40 UTC
  • Revision ID: brian@tangent.org-20090210001440-qjg8eofh3h93064b
Adding Multi-threaded Scheduler into the system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
static uint32_t created_threads, killed_threads;
30
30
static bool kill_pool_threads;
31
 
static bool isEnabled= true;
32
31
 
33
32
static struct event session_add_event;
34
33
static struct event session_kill_event;
554
553
{
555
554
  scheduling_st* func= (scheduling_st *)p;
556
555
 
557
 
  if (isEnabled == false)
558
 
  {
559
 
    func->is_used= false;
560
 
    return 0;
561
 
  }
562
 
  func->is_used= true;
563
 
 
564
556
  assert(size != 0);
565
557
  func->max_threads= size;
566
558
  func->post_kill_notification= post_kill_notification;
585
577
                           N_("Size of Pool."),
586
578
                           NULL, NULL, 8, 1, 1024, 0);
587
579
 
588
 
static DRIZZLE_SYSVAR_BOOL(enabled, isEnabled,
589
 
                           PLUGIN_VAR_NOCMDARG,
590
 
                           N_("Enable Pool of Threads Scheduler"),
591
 
                           NULL, /* check func */
592
 
                           NULL, /* update func */
593
 
                           true /* default */);
594
 
 
595
580
static struct st_mysql_sys_var* system_variables[]= {
596
581
  DRIZZLE_SYSVAR(size),
597
 
  DRIZZLE_SYSVAR(enabled),
598
582
  NULL,
599
583
};
600
584