gEDA-dev: [RFC] Guile Fluids in gEDA
Peter Clifton
pcjc2 at cam.ac.uk
Thu Jan 10 13:27:36 EST 2008
On Thu, 2008-01-10 at 07:56 -0800, Steve Meier wrote:
> The main point I think about guile, fluids and smobs is that fluids
> allow safely sharing variable between threads. Since guile is
> multithreading this can be critical.
>
> If you print to stdout from both within libgeda and from within a scheme
> script you will see that there is no guarenty that you can predict the
> order of the print statements apearing.
Can you post an exmaple of that? I suspect this probably has more to do
with flushing of IO buffers than threading though.
I strongly suspect it isn't in our case, at the very least.. it doesn't
execute arbitrary user code in a new thread without being told. Perhaps
it has a GC thread, but even that I doubt. GTK doesn't warn us about any
problems initialising multi-threading safety. (It cares, even if it is
mostly non thread-safe).
> I am curious about how the data is protected within a fluid? semiphores?
It takes on a whole new context as I understand it. It isn't mutually
exclusive access. Its like a dynamically scoped global variable. (Which
makes it kindof less global I guess!).
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
More information about the geda-dev
mailing list