threadpool Overview | Reference | Tutorial | Examples | Design
Tutorial Quick Start | Prioritized Tasks | Arbitrary Task Functions | Advanced Pool Instantiation

Advanced Instantiation

TODO This tutorial is out dated.

TODO
Pool instantiation

    boost::shared_ptr<fifo_pool> tp = fifo_pool::create_pool(5);      

    print("  Add tasks ...\n");
    tp->schedule(&task_1);
    tp->schedule(&task_2);
    tp->schedule(&task_3);

    tp->schedule(looped_task_func(&looped_task, 1500));

    print("  Wait until all tasks are finished ...\n");
    tp->wait();
    print("  Tasks finished!\n");

    typedef threadpool::pool<boost::function0<void>, threadpool::fifo_scheduler<boost::function0<void> > > pool_type;
    boost::shared_ptr< pool_type > tp = pool_type::create_pool(5);      

Copyright © 2005-2008 Philipp Henkel Overview | Reference | Tutorial | Examples | Design

Hosted by SourceForge.net Logo