Rev 321 | Blame | Last modification | View Log | RSS feed
#include <cstdio>#include <unistd.h>using namespace std;#include <boost/thread/thread.hpp>#include <boost/bind.hpp>#include "controller.h"#include "elevator.h"int main (int argc, char *argv[]){int i = 0;Elevator e1 (10);Controller c (10, 5);vector<Elevator> elevators (5, Elevator (10));// start t1boost::thread t1 (boost::bind (e1.thread_entry, &e1));// do some useful stuff here// notify t1 that it needs to stope1.thread_exit ();// wait for t1 to stopt1.join ();return 0;}