
10 Mar
2009
10 Mar
'09
11:01 a.m.
However, I'm not sure whether to choose of poll_one or run_one in this case. I.e., I'm looking for the cheapest "do some other stuff" of asio's io_service.
run_once() is ok here, but anyway your loop will *block* any further iterations until result_available == true, won't it? If so, why not just use synchronous asio functions? Actually, they are already implemented in the very similar way to what you're trying to do.