From: Yang, Chul-Woong
Subject: q) timer related facility in CL
Date: 
Message-ID: <MrDYb.110487$S3.1031492@news.bora.net>
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

From: Yang, Chul-Woong
Subject: Re: q) timer related facility in CL
Date: 
Message-ID: <eNDYb.110488$S3.1031752@news.bora.net>
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
From: Yang, Chul-Woong
Subject: Re: q) timer related facility in CL
Date: 
Message-ID: <W8EYb.110489$S3.1032465@news.bora.net>
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
From: Kenny Tilton
Subject: Re: q) timer related facility in CL
Date: 
Message-ID: <QmGYb.149474$cM1.28885879@twister.nyc.rr.com>
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