Re: localtime() thread-safe or not?
- From: "Phil Frisbie, Jr." <phil@xxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 12:21:44 -0800
MarkMark wrote:
localtime() C Runtime API is documented (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_localtime.asp) to return result in static memory, which, of course is not thread safe.
However, indirect evidence (http://support.microsoft.com/default.aspx?scid=kb;en-us;104641) appears to suggest that localtime() actually uses Thread Local Store which makes it thread safe.
So my question is -- is localtime() really thread safe or not?
The entire C runtime is thread safe it you create the thread using _beginthread() or _beginthreadex().
-- Phil Frisbie, Jr. Hawk Software http://www.hawksoft.com .
- Follow-Ups:
- Re: localtime() thread-safe or not?
- From: Jochen Kalmbach [MVP]
- Re: localtime() thread-safe or not?
- Prev by Date: Re: While-Statement
- Next by Date: Re: localtime() thread-safe or not?
- Previous by thread: Re: While-Statement
- Next by thread: Re: localtime() thread-safe or not?
- Index(es):
Relevant Pages
|
|