00001 #ifndef toast_async_worker_hpp_INCLUDED
00002 #define toast_async_worker_hpp_INCLUDED
00003
00004 #include <list>
00005 #include <boost/scoped_ptr.hpp>
00006 #include <toast/async/request.hpp>
00007
00008 namespace toast {
00009 namespace async {
00010
00011 class worker_pool;
00012
00020 class worker
00021 {
00022 struct impl;
00023 boost::scoped_ptr<impl> impl_;
00024 public:
00035 worker(bool complete = false);
00036
00038 void complete();
00039
00041 ~worker();
00042
00050 void push(request const &);
00051
00058 void push(std::list<request> &);
00059 };
00060
00063 }
00064 }
00065
00066 #endif // toast_async_worker_hpp_INCLUDED