Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » Linux MT problems with time functions
Linux MT problems with time functions [message #25360] Thu, 18 February 2010 18:48 Go to next message
zsolt is currently offline  zsolt
Messages: 576
Registered: December 2005
Location: Budapest, Hungary
Contributor
I'm planning introducing threading in one of my projects, but I found a problem with unix time handling functions.

localtime() and gmtime() functions are using a library internal tm struct, so they are not thread-safe, but they are used in U++ core.

It would be a good idea to change them to their _r variant soon, I think.

I can do the fixes, but it is not very urgent for me, as I'm not working on this project yet, but I think somebody else can fix this bugs, if he/she feels it very important.
Re: Linux MT problems with time functions [message #25386 is a reply to message #25360] Sat, 20 February 2010 17:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11843
Registered: November 2005
Ultimate Member
zsolt wrote on Thu, 18 February 2010 12:48

I'm planning introducing threading in one of my projects, but I found a problem with unix time handling functions.

localtime() and gmtime() functions are using a library internal tm struct, so they are not thread-safe, but they are used in U++ core.

It would be a good idea to change them to their _r variant soon, I think.

I can do the fixes, but it is not very urgent for me, as I'm not working on this project yet, but I think somebody else can fix this bugs, if he/she feels it very important.


Done.

Mirek
Re: Linux MT problems with time functions [message #25398 is a reply to message #25386] Sun, 21 February 2010 22:39 Go to previous message
zsolt is currently offline  zsolt
Messages: 576
Registered: December 2005
Location: Budapest, Hungary
Contributor
Thanks!
Previous Topic: what about WorkQueue : public CoWork
Next Topic: multi-threading slower than single thread
Goto Forum:
  


Current Time: Thu Apr 25 00:04:30 CEST 2019

Total time taken to generate the page: 0.00607 seconds