Class scheduler

poet::scheduler — Execute method requests in a separate thread.


class scheduler : public poet::scheduler_base {
  // construct/copy/destruct
  scheduler(const boost::shared_ptr<activation_queue_base> & = boost::shared_ptr<activation_queue_base>(new out_of_order_activation_queue));
  virtual ~scheduler();

  // public member functions
  virtual void 
  post_method_request(const boost::shared_ptr<method_request_base> &) ;
  virtual void kill() ;
  virtual void join() ;


A scheduler object creates a new thread of execution which pulls method requests from an activation queue and executes them.

scheduler public construct/copy/destruct

  1. scheduler(const boost::shared_ptr<activation_queue_base> & queue = boost::shared_ptr<activation_queue_base>(new out_of_order_activation_queue));

    The scheduler constructer will create a new thread of execution, where the scheduler will execute method requests.



    Allows use of a customized activation queue. By default, an out_of_order_activation_queue is allocated for use.

  2. virtual ~scheduler();

    The scheduler thread will continue to run after the scheduler object is destroyed, until all method requests in its activation queue have been dispatched (unless the kill method has been called).

scheduler public member functions

  1. virtual void 
    post_method_request(const boost::shared_ptr<method_request_base> & request) ;

    Adds request to the scheduler's activation queue.

  2. virtual void kill() ;

    Tells scheduler thread to exit as soon as possible. The scheduler thread may still be running after this function returns.

  3. virtual void join() ;

    Blocks until the scheduler thread exits.