I say it definitely shouldn't. Only functions that block should release the mutex, and the localtime functions doesn't block.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-06-17 23:22: Subject: Re: Pike localtime(), threads safe and low level localtime() / localtime_r() ?
If we can use the _r function this can allow us more stablity and less cost. A mutex, AFAIK, cost a bit.
Which is why it's cheaper NOT to unlock than to unlock. Now, using localtime_r anyway is fine, but it's questionable whether the lock should be released or not. I say that it probably shouldn't.
/ David Hedbor