moteus / lua-llthreads2

`llthreads` library rewritten without `LuaNativeObjects` code generator
MIT License
76 stars 22 forks source link

Wrong/duplicate error strings #14

Closed BigJim closed 7 years ago

BigJim commented 7 years ago

In llthread.c: "l_llthread_alive()" it has the same error stings as "l_llthread_join()".

Shouldn't these say "alive" in them and not "join"?

Update: I might misunderstand this method. It appears it's supposed to join, not just test if thread is still alive.

moteus commented 7 years ago

Alive method is just join with timout=0. But with one difference. Alive does not destroy child Lua state and does not pass any results. So if alive returns filse it is still possible call join to to get returns values. Second call of join will raise error. Yes. on posix system it is implemented not as join. But I think this is good abstraction. So llthreads handle alive and join in similar way.