Boost logo

Boost Testing :

Subject: Re: [Boost-testing] How to test callbacks / non-blocking calls?
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-06-19 20:55:54


ariasgore_at_[hidden] wrote:
> Hello,
>
>> Can't you wait till communication is completed? In worse case you can wait
>> on
>> conditional variable and trigger it inside the callback.
>
> Is this a general approach on such problems? I already had some thoughts about a while (!finish) sleep(x) loop but was not sure if there is a more cleaner way to do that, since this looks a lot like hacking around :)

You can choose whatever approach seems less hacky to you, but I can't
check assertion 20 seconds after your test module is finished.

Gennadiy


Boost-testing list run by mbergal at meta-comm.com