lua-users home
lua-l archive

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

On Wed, Jun 22, 2011 at 10:09 AM, Roberto Ierusalimschy <> wrote:
> On Tue, Jun 21, 2011 at 6:21 PM, Luiz Henrique de Figueiredo
> <> wrote:
> > Lua 5.2.0 (beta-rc2) is now available at
> Do the new setlocale calls in ldo.c change thread safety assumptions
> Lua?

It seems so :(


I think there's no easy way. On posix systems you can use newlocale / uselocale / freelocale to change it per-thread [1]
On Windows you have SetThreadLocale [2]. So, changing locale in a thread safe way is not portable. Some #ifdefs will be needed.