guile-devel
[Top][All Lists]
Advanced

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

Re: scm_i_fraction_reduce thread safety


From: Marius Vollmer
Subject: Re: scm_i_fraction_reduce thread safety
Date: Sat, 10 Jan 2004 23:38:54 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Kevin Ryde <address@hidden> writes:

> Bill Schottstaedt <address@hidden> writes:
>>
>> I'd vote for a lock,
>
> I guess everywhere inspecting the parts of a fraction would need to
> acquire and release such a lock.  Perhaps a macro that did that and
> delivered out the parts could stop it being too awful when coding.

This is a general problem with the data structures in libguile and we
need to solve it generally.  I haven't made my mind up about this
yet... there is the drastic and easy way: restrict guile threads to be
cooperative (then we don't need object-level locks).  Or we could
allow full concurrency and be pedantic about object-level locks.

Allowing full concurrency is very attractive if we can pull it off.
It looks like we can, but it will be hard to be convinced that
absolutely no race conditions exist in libguile, and that users of
libguile wont introduce new ones.

> Unfortunately I believe it is, in the new-style free-running
> concurrent posix threads.  It'll be one of those threading things
> that might almost never actually cause a problem, but alas is not
> right.

Right.  I don't have the courage or arguments right now to remove the
fully concurrent threads, but I know I would feel happier if we didn't
had them...

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

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