unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* scm_i_fraction_reduce thread safety
@ 2003-12-11 11:43 Bill Schottstaedt
  2003-12-11 19:19 ` Carl Witty
  0 siblings, 1 reply; 22+ messages in thread
From: Bill Schottstaedt @ 2003-12-11 11:43 UTC (permalink / raw)


Actually I was thinking about garbage collection when
I wrote that note (more of a reminder to myself to
check it, which I of course forgot to do). I'd vote
for a lock, if it's really an issue.

On the need for reduction, I wonder how much of that
notoriety is due to Knuth -- his discussion of this
was in a slightly artificial context, and I've been
intending for a long time to check some "real-world"
situation.  (I think it's less of a problem than
calling gcd all the time).

Perhaps Han-Wen has some info on this?



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 22+ messages in thread
* scm_i_fraction_reduce thread safety
@ 2003-12-09 20:39 Kevin Ryde
  0 siblings, 0 replies; 22+ messages in thread
From: Kevin Ryde @ 2003-12-09 20:39 UTC (permalink / raw)


There's a comment in scm_i_fraction_reduce questioning the safety of
modifying the given fraction.

I think it probably isn't safe, if other threads are looking at the
fraction concurrently, and also I suspect two threads running that
reduce function itself would not be safe.

Not sure what to do about it.  I guess the choices would be between
some sort of lock, not storing back reduced values, or keeping
fractions reduced always.

Reducing every so often might be a good idea, since rational
arithmetic is a bit notorious for intermediate expression swell.
Maybe gc could do something.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2004-02-01 18:49 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-11 11:43 scm_i_fraction_reduce thread safety Bill Schottstaedt
2003-12-11 19:19 ` Carl Witty
2003-12-12 12:11   ` Bill Schottstaedt
2003-12-12 15:04   ` Paul Jarc
2003-12-12 23:23   ` Kevin Ryde
2004-01-10 22:38     ` Marius Vollmer
2004-01-10 23:29       ` Kevin Ryde
2004-01-11  1:31         ` Marius Vollmer
2004-01-12  0:51           ` Kevin Ryde
2004-01-12  5:22             ` Richard Todd
2004-01-14 21:09               ` Kevin Ryde
2004-01-21  0:03               ` Marius Vollmer
2004-01-21  0:00             ` Marius Vollmer
2004-01-21  3:11               ` Carl Witty
2004-01-21 21:06                 ` Marius Vollmer
2004-01-27 22:15                 ` Dirk Herrmann
2004-01-27 23:24                   ` Rob Browning
2004-01-29 19:35                     ` Marius Vollmer
2004-01-29 20:32                       ` Rob Browning
2004-01-30 14:45                       ` Mikael Djurfeldt
2004-02-01 18:49                         ` Andy Wingo
  -- strict thread matches above, loose matches on Subject: below --
2003-12-09 20:39 Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).