Real.toString

Stephen Weeks MLton@sourcelight.com
Thu, 4 Oct 2001 15:15:35 -0700


> For Real.toString, the more important question is the thread safety.  On the
> one hand, it really is going to cost us performance wise if we have to allocate
> the buffer on every call.  On the other hand, the current code will clearly
> fail in the most horrible of non-deterministic ways if we have fine-grained
> enough context switching.  One way or another we have to decide which way
> we are going.  I would argue that multiple threads is a bad idea (nothing
> new from me).

The MLton basis library is not thread safe and I think it should stay that way.
If we need thread safety, we should put wrappers around unsafe stuff to do
the necessary locking.  Then, only threads pay.