Friday, 27 September 2013

Implement thread safe ctime function

Implement thread safe ctime function

ANSI C time function are not thread safe: in particular gmtime, ctime and
strftime. For what I know the only thread-safe function is time.
If I'm right in Visual Studio this function are all thread safe. I'm using
MinGW compiler (4.8.0 with dwarf-2, that one provided by Qt 5.1.0 ).
How can inplement thread safe function of gmtime_r, ctime_r and
strftime_r? Or is there a more thread-safe library for that?
I'm using C++11 as default language.

No comments:

Post a Comment