lthread
lthread copied to clipboard
lthread_join is misleading
When calling lthread_join, you need check return result before freeing the lthread struct. It is too easy to cause memory leak or corruption.
A better solution is to follow pthread_join behavior: No timeout parameter. The caller need to free 'lthread' struct.