Re: Timeout Implementation



If you don't get data in time, you don't have to cancel the request. Just
indicate it to the user (or let the user app to figure it out)..

The problem is that you might lose data that arrives during URB
cancellation.

"db_from_mn" <dburns@xxxxxxxxxxxxxxxx> wrote in message
news:bMWdnT96-M7-8ifenZ2dnUVZ_sSdnZ2d@xxxxxxxxxxxxxx
> Hello Maxim,
> It is true that in the normal case, it would be ok to block forever. But
> there are situations where data is expected, and if it does not arrive in
> a timely fashion, the user code must indicate an error condition.
> Thanks for your comment,
> Dennis
>
> "Maxim S. Shatskih" <maxim@xxxxxxxxxxxxxxxx> wrote in message
> news:eHVFX0EEGHA.140@xxxxxxxxxxxxxxxxxxxxxxx
>>> I'd like to implement a mechanism whereby the user code can request
>>> data,
>>> but if it's not available, it can can block up to a programmable timeout
>>> delay, until the data is available.
>>
>> Why use any timeouts here? The usual semantic is to block forever, till
>> the
>> handle will be closed (by cancellation due to process being killed too)
>> or till
>> the data will arrive, or till the device will be detached.
>>
>> --
>> Maxim Shatskih, Windows DDK MVP
>> StorageCraft Corporation
>> maxim@xxxxxxxxxxxxxxxx
>> http://www.storagecraft.com
>>
>
>


.



Relevant Pages

  • Re: Current IRP: time out or cancel?
    ... Cancellation of the current IRP is usually supported for requests which require waiting an arbitrairly long period of time for some external event - like a keypress or a network packet. ... What usually isn't supported is cancellation of the request while the driver is actively programming the hardware to run it, ...
    (microsoft.public.development.device.drivers)
  • Re: Urgent advice required - last-minute adjournment of Small Claims Court hearing
    ... The case hinges around the functional capabilities of a ... put in a request for internet access a few days prior to the case, ... The reason for his cancellation are only relevant ... per contract, i.e. as per specification and timescale. ...
    (uk.legal)
  • Re: Recurring meeting exceptions
    ... Update and delete are two separate things, for an update you send a request ... and for a delete you send a cancellation message. ... > When I make an exception to a meeting, ... > set instancetype to 3 and set the uid to that of the recurring meeting. ...
    (microsoft.public.exchange2000.development)
  • Avoiding cleanup race conditions: How to?
    ... Suppose we have a function in the kernel driver that potentially waits ... Suppose we implemented cancellation logic and IRP_MJ_CLEANUP with ... IO request was saved/queued in the device extension before arrival ... In the second case IRP_MJ_CLEANUP can't find the IRP. ...
    (microsoft.public.development.device.drivers)