Thanks everyone, this thread has been enlightening :) I understand
dynamic-wind better now, but for my purposes a handle-exceptions macro
is probably sufficient.
Cheers,
-- Fredrik
Am Sun, 8 Nov 2020 02:17:58 +
schrieb Chris Vine :
> I wonder therefore why you think that this renders the proposed
> with-lock function inappropriate, if that is what you were implying?
> Perhaps you weren't and were making some other point. Macros for
> handling resources such as mutex
On Sat, 7 Nov 2020 20:02:12 -0500
John Cowan wrote:
> On Sat, Nov 7, 2020 at 5:51 PM Chris Vine wrote:
> >On Fri, 6 Nov 2020 17:20:04 +0100
> >"Jörg F. Wittenberger" wrote:
> > > This approach is bound to fail badly.
> > >
> > > It works just as long as there are a) no exceptions raised in
On Sat, Nov 7, 2020 at 5:51 PM Chris Vine wrote:
> For my elucidation, why? The indentation of the code isn't ideal but
> the whole purpose of dynamic-wind is to handle code leaving the thunk in
> case of exception, application of a continuation object or regular
> return.
>
You're right
On Fri, 6 Nov 2020 17:20:04 +0100
"Jörg F. Wittenberger" wrote:
> Am Thu, 05 Nov 2020 23:22:09 +0100
> schrieb Fredrik Appelberg :
>
> > 3. I'm new to dynamic-wind. If I wanted to create a general form for
> >executing a thunk protected by a mutex, would this be a good idea?
> >
> >
Am Fri, 06 Nov 2020 17:48:26 +0100
schrieb felix.winkelm...@bevuta.com:
> > I'm not doing any call/cc or non-local exit shenanigans, but the
> > code uses srfi-18 threads and does I/O over TCP. As I understand
> > it, srfi-18 is implemented using continuations. Will that cause
> > problems with
> I'm not doing any call/cc or non-local exit shenanigans, but the code
> uses srfi-18 threads and does I/O over TCP. As I understand it, srfi-18
> is implemented using continuations. Will that cause problems with my
> with-lock function? I'm thinking that a thread that has aquired the lock
> in
Am Thu, 05 Nov 2020 23:22:09 +0100
schrieb Fredrik Appelberg :
> 3. I'm new to dynamic-wind. If I wanted to create a general form for
>executing a thunk protected by a mutex, would this be a good idea?
>
> (define (with-lock mutex thunk)
>(dynamic-wind
>(lambda ()
felix.winkelm...@bevuta.com writes:
Hi, and thanks for the reply :)
>> 1. Are there any problems with creating a condition (as in exception,
>>not srfi-18 condition variable) in one thread and raising it in one
>>or more other threads?
>
> No problem here, I'd say, data can be freely
> 1. Are there any problems with creating a condition (as in exception,
>not srfi-18 condition variable) in one thread and raising it in one
>or more other threads?
No problem here, I'd say, data can be freely exchanged between threads,
since they share a global address space. A condition
Hi all,
I learned Scheme back in my university days, but that was mostly
computer sciency, SICP stuff. Now I'm trying to get actual, practical
work done, and have to read up on threads, I/O and all that jazz. So I
have some newbie questions:
1. Are there any problems with creating a condition
11 matches
Mail list logo