[plt-scheme] File Locks

From: Matt Jadud (mcj4 at kent.ac.uk)
Date: Thu Aug 11 07:01:42 EDT 2005

I am but a grasshopper in my macro-fu?

M

Eli Barzilay wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> On Aug 11, Matt Jadud wrote:
> 
>>[...]
>>(define-syntax forever
>>   (lambda (stx)
>>     (syntax-case stx ()
>>       [(forever bodies ...)
>>        #`(let loop ()
>>            #,@(syntax->list (syntax (bodies ...)))
>>            (loop))])))
> 
> 
> Um, any need for this huge block of verbosity?  Seems like this is a
> simple:
> 
>   (define-syntax forever
>     (syntax-rules ()
>       [(forever bodies ...)
>        (let loop () bodies ... (loop))]))
> 
> In any case, your solution will obviously work as long as there is a
> single process that tries to write to the file.  DrScheme uses a
> lockfile for preferences in case you're running several instances.
> 



Posted on the users mailing list.