Hi Monty, On Fri, May 06, 2016 at 12:52:02PM +0300, Michael Widenius wrote:
Hi!
On 5 May 2016 17:42, "Sergey Vojtovich" <svoj@mariadb.org> wrote:
Hi Monty,
Thanks for you reply. Please allow me to disagree with some points. :)
Attached please find 2 patches, both fix this memory leak. One approach is for detached threads, another one is for joinable threads.
Sorry, I missed the part about service threads. For these I don't mind to use joinable threads. Ok, mystery solved now! Thanks for confirming you're not against them in general.
Just one question: How to handle hanged threads? With the old code we could, if this would ever be a problem, just change cond_wait to cond_timed_wait. Don't know how to do this with joinable threads, except using alarms which is a bit of code (20 lines)
I don't think pthread_join() is good for hanged threads. But threads should never hang either. Regards, Sergey