guile-devel
[Top][All Lists]
Advanced

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

Re: [Request] How about adding with-locale?


From: Mark H Weaver
Subject: Re: [Request] How about adding with-locale?
Date: Sat, 24 Mar 2012 06:24:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Nala Ginrut <address@hidden> writes:
> Will it be a proper solution if I use "monitor"?

No, that wouldn't work.  For one thing, what if the body of
'with-locale' takes a long time?  Also, consider this:

  Thread 1: (with-locale "foo" (strftime ...))
  Thread 2: (format ...)

If the 'format' and the 'strftime' happen simultaneously, then 'format'
will use the "foo" locale, which is incorrect.

During 'with-locale', we would have to prevent other threads from doing
_any_ locale-dependent operation.  In a system like Guile, where a
process may contain arbitrary C code and shared libraries, there's no
sane way for us to do this.  In any case, it would not scale well.

    Regards,
      Mark



reply via email to

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