[slime-devel] Today's Daily ChangeLog diff
Helmut Eller
heller at common-lisp.net
Thu May 10 07:45:17 UTC 2012
* Gábor Melis [2012-05-10 07:21] writes:
> Helmut Eller <heller at common-lisp.net> writes:
>
>> * Nikodemus Siivola [2012-05-10 06:14] writes:
>>
>>> On 7 May 2012 08:45, Helmut Eller <heller at common-lisp.net> wrote:
>>>
>>>>> Without digging deeper, it seems to me that there is an outer
>>>>> deadline from
>>>>> another WITH-DEADLINE. In the old version you're using :OVERRIDE,
>>>>> which means
>>>>> that even if you specify a longer wait, you get what you ask for.
>>>>>
>>>>> In the new version the outer WITH-DEADLINE specifies a shorter wait
>>>>> than the :TIMEOUT you request, and that happens -- and a
>>>>> deadline-timeout is signalled, etc.
>>>>
>>>> Is WITH-DEADLINE part of the official API? Seriously?
>>>
>>> If you mean "am I really supposed to wrap WITH-DEADLINE around
>>> CONDITION-WAIT calls", not generally.
>>
>> I meant more "is it possible to write reliable programs with such an
>> API".
>>
>>> In this case however, something else, probably the :AROUND method on
>>> STREAM-FORCE-OUTPUT, has provided a tighter deadline. In such case the
>>> system obeys the global deadline. Sticking a longer deadline into
>>> S-F-E :AROUND would achieve the same result from practical POV.
>>
>> Apparently not.
>
> IMHO, the composition semantics of WITH-DEADLINE are an improvement over
> WITH-TIMEOUT. It's certainly debatable whether the hack in
> STREAM-FORCE-OUTPUT is in good style, but it's there for a reason. It's
> hardly the fault of the API.
It seems to me that WITH-DEADLINE must be used whenever we wait for
something and don't know for certain that we aren't inside another
WITH-DEADLINE. I.e. "in general" WITH-DEADLINE must be used and only in
the special case when we know that no caller used WITH-DEADLINE can it
be omitted. I think both WITH-DEADLINE and WITH-TIMEOUT are bad ideas.
Helmut
More information about the slime-devel
mailing list