C++ Logo

sg13

Advanced search

Re: [SG13] Thursday's Telecon

From: Timur Doumler <cpp_at_[hidden]>
Date: Tue, 18 Jun 2019 17:50:32 +0300
Update:

> On 18 Jun 2019, at 17:29, Timur Doumler via SG13 <sg13_at_[hidden]> wrote:
>>
>> 7. 7.1/7.3 the while(true); is ihmo UB. Could we make it while(device.has_unprocessed_io()); or similarly check the state of it.
>
> Also correct. Will fix.

I fixed this, however while(device.has_unprocessed_io()); would be the wrong condition if you do async processing (the normal case). Better to use while(device.is_running()). This way the loop will stop as soon as the device becomes unavailable or the user stops it.

Cheers,
Timur


Received on 2019-06-18 09:52:25