guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recursive mutexes?


From: Thomas Bushnell, BSG
Subject: Re: Recursive mutexes?
Date: 26 Oct 2002 18:18:16 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Tom Lord <address@hidden> writes:

>        > Trying or thinking through, sure.   
> 
> And, to be fair, sometimes the best way to think something through is
> in parallel with trying to implement it -- no disrespect intended
> towards people hacking on Guile threads.

I think that problems like this require a somewhat more "daring"
approach.  For example, threads need not slow down access to the
store.  

Threads in C do not, in general, slow down access.  Only when there is
an actual lock necessary do they slow anything down.  The same thing
should be true in a *good* scheme system.

In a safe language like Scheme, this probably means that you have to
be willing to accept arbitrary preemption.  And, indeed, I knew this
way back when guile was a dream, and said to people "if there are
going to be threads, use real OS (i.e., preemptible on arbitrary
instructions) threads".  I was initially told "yeah, we'll do that",
and then it didn't happen, because "it's too hard".

Well, yeah, it's hard.  But I don't think it's anything like
unsolvable.  It's actually not that hard at all if you think carefully
about it and decide exactly what guarantees need to be provided and
when.

That's one of your issues about why "threads are bad".  I don't see it
as any reason why threads are bad, but rather about why the (sadly)
normal implementation is bad.

Thomas







reply via email to

[Prev in Thread] Current Thread [Next in Thread]