halayli / lthread

lthread, a multicore enabled coroutine library written in C
Other
814 stars 82 forks source link

lthread_join is misleading #36

Open kangjianbin opened 9 years ago

kangjianbin commented 9 years ago

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.