Hi.
Are there any facility like below with-fixed-time in CL (esp SBCL)?
(defun foo()
(with-fixed-time ( time-interval
(setf s (make-socket))
(connect-to-host s :host foo :port baz)
...
))
? (foo)
- signal an error if the clauses of with-fixed-time does not end
in given time-interval
After deciding to build simple network application in SBCL, I have met
too many walls. My life with CL is tough yet. :-(
TIA, Regards.
Yang, Chul-Woong
······@aratech.co.kr
I'm afraid my question isn't clearly described.
The execution of clauses with with-fixed-time should be terminated at
given time-interval elapsed.
So (with-fixed-time (5 (loop))) must signal error after 5 seconds.
Give me an insight. TIA
--
Yang, Chul-Woong
······@aratech.co.kr
Yang, Chul-Woong wrote:
> Hi.
>
> Are there any facility like below with-fixed-time in CL (esp SBCL)?
>
> (defun foo()
> (with-fixed-time ( time-interval
> (setf s (make-socket))
> (connect-to-host s :host foo :port baz)
> ...
> ))
>
> ? (foo)
> - signal an error if the clauses of with-fixed-time does not end
> in given time-interval
>
>
> After deciding to build simple network application in SBCL, I have met
> too many walls. My life with CL is tough yet. :-(
>
> TIA, Regards.
>
> Yang, Chul-Woong
> ······@aratech.co.kr
Self-reply. shame on me.
sb-ext:with-timeout macro is the exact one i want.
(why I forgot apropos...)
Thanks to SBCL developers.
Yang, Chul-Woong wrote:
> I'm afraid my question isn't clearly described.
> The execution of clauses with with-fixed-time should be terminated at
> given time-interval elapsed.
>
> So (with-fixed-time (5 (loop))) must signal error after 5 seconds.
>
> Give me an insight. TIA
> --
> Yang, Chul-Woong
> ······@aratech.co.kr
>
> Yang, Chul-Woong wrote:
>
>> Hi.
>>
>> Are there any facility like below with-fixed-time in CL (esp SBCL)?
>>
>> (defun foo()
>> (with-fixed-time ( time-interval
>> (setf s (make-socket))
>> (connect-to-host s :host foo :port baz)
>> ...
>> ))
>>
>> ? (foo)
>> - signal an error if the clauses of with-fixed-time does not end
>> in given time-interval
>>
>>
>> After deciding to build simple network application in SBCL, I have met
>> too many walls. My life with CL is tough yet. :-(
>>
>> TIA, Regards.
>>
>> Yang, Chul-Woong
>> ······@aratech.co.kr
Yang, Chul-Woong wrote:
> Self-reply. shame on me.
>
> sb-ext:with-timeout macro is the exact one i want.
> (why I forgot apropos...)
I show 48 minutes between your original query and your announcement of
finding the fix on your own. Nothing to be ashamed of there. And, yeah,
apropos is awesome.
kenny