~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pool_of_threads/pool_of_threads.cc

  • Committer: Siddharth Prakash Singh
  • Date: 2010-03-26 19:25:23 UTC
  • mfrom: (1410 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1425.
  • Revision ID: spsneo@spsneo-laptop-20100326192523-ibjlbt1p692vobtj
merging with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
static volatile bool kill_pool_threads= false;
37
37
 
38
38
static volatile uint32_t created_threads= 0;
39
 
static int deinit(drizzled::plugin::Registry &registry);
40
39
 
41
40
static struct event session_add_event;
42
41
static struct event session_kill_event;
637
636
 * 
638
637
 * @param[in] registry holding the record of the plugins
639
638
 */
640
 
static int init(drizzled::plugin::Registry &registry)
 
639
static int init(drizzled::plugin::Context &context)
641
640
{
642
641
  assert(size != 0);
643
642
 
644
643
  scheduler= new PoolOfThreadsScheduler("pool_of_threads");
645
 
  registry.add(scheduler);
646
 
 
647
 
  return 0;
648
 
}
649
 
 
650
 
/**
651
 
 * @brief
652
 
 *  Waits until all pool threads have been deleted for clean shutdown
653
 
 */
654
 
static int deinit(drizzled::plugin::Registry &registry)
655
 
{
656
 
  registry.remove(scheduler);
657
 
  delete scheduler;
 
644
  context.add(scheduler);
658
645
 
659
646
  return 0;
660
647
}
682
669
  "Pool of Threads Scheduler",
683
670
  PLUGIN_LICENSE_GPL,
684
671
  init, /* Plugin Init */
685
 
  deinit, /* Plugin Deinit */
686
672
  sys_variables,   /* system variables */
687
673
  NULL    /* config options */
688
674
}