lua-users home
lua-l archive

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

On Mon, Nov 28, 2011 at 10:40 AM, Ignacio Burgueño <> wrote:
I just have been bitten by the fact uses gmtime and localtime, which aren't threadsafe. Since its threadsafe counterparts (gmtime_r and localtime_r) can't be used, at least a note on the documentation could be provided? Both for Lua 5.1.4 and Lua 5.2

Lua 5.2.0 now uses 'ftello' and 'fseeko' on Posix systems, which are not ANSI standard either. It would be useful to use gmtime_r and localtime_r on Posix systems (and simple to implement)

Supposedly localtime and gmtime use thread local storage on Windows, so the issue does not exist there.