Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] posting a function to an io_service object
From: Igor R (boost.lists_at_[hidden])
Date: 2009-12-28 10:57:58


> Using Boost.Asio, f() always gets called from the main thread:

You use io_service incorrectly, please see asio tutorial/examples.

>    while (ios1.poll() > 0)
>        ;
>    while (ios2.poll() > 0)
>        ;

io_services are already running - in other threads - why do you poll()
them here?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net