[usocket-devel] wait-for-input fix for CLISP
Chun Tian (binghe)
binghe.lisp at gmail.com
Sun Apr 10 16:42:59 UTC 2011
Hi, Anton
No, the form passed to SOCKET-STATUS *DO NOT* depend on READY-ONLY (note: it's READY-ONLY, not READ-ONLY).
Actually, all your patch does was the status updating "after" CLISP's SOCKET-STATUS returned. This means, if a socket do have some inputs are waiting for read, CLISP's SOCKET-STATUS can definitely normally return, even without your patch.
As far as I know, many USOCKET users (or packages) were using WAIT-FOR-INPUT in a trivial way (including me): they send something to one socket, and call WAIT-FOR-INPUT on it (without READY-ONLY), never care the return value or the STATE slot of usocket object, and the buggy W-F-I just works for many years ... until Hunchentoot users start to run it on CLISP ...
On the other hand, what you patched is more valuable when (:READY-ONLY T) was added when calling W-F-I. Your patch caused the STATE slot from multiple usocket objects were updated correctly, and W-F-I will just return those sockets who can be read (this logic appears in the implementation of W-F-I itself in usocket.lisp, code shared by all backends).
So, I think your patch is just enough. Thanks again!
--binghe
在 2011-4-10,23:16, Anton Vodonosov 写道:
>
>
> 10.04.2011, 18:39, "Chun Tian (binghe)" <binghe.lisp at gmail.com>:
>> Hi, Anton
>>
>> Thank you very much for looking into this issue and finally fixed it!
>> I believe this also closed another open issue reported by other users on Hunchentoot
>> mailing list, in which they have to disable the use of READY-ONLY
>> argument when calling WAIT-FOR-INPUT.
>>
>
> Dos the form of the argument passed to the CLISP function
> socket:socket-status depend on the usocket parameter READ-ONLY?
> (the variable REQUEST-LIST in the WAIT-FOR-INPUT-INTERNAL code)
>
> I mean, if changing the READ-ONLY argument made the old code
> working, i.e. (pop status-list) was sufficient, then the new
> code should take this into account.
>
> What is the value of the REQUEST-LIST variable?
>
> Best regards,
> - Anton
More information about the usocket-devel
mailing list