Discussion:
possible equality bug with Lua thread objects?
Cosmin Apreutesei
2014-09-07 11:39:45 UTC
Permalink
Hi,

Is it possible to have thread1 ~= thread2 while tostring(thread1) ==
tostring(thread2) ?

The values come from coroutine.running(). Tested with jit on/off, lj
2.0.3-august5

I have run into this and I'm not sure if it's a bug or expected
behavior. Do threads have identity like tables?

Thanks.

--Cosmin.
Mike Pall
2014-09-08 21:45:12 UTC
Permalink
Post by Cosmin Apreutesei
Is it possible to have thread1 ~= thread2 while tostring(thread1) ==
tostring(thread2) ?
No.
Post by Cosmin Apreutesei
The values come from coroutine.running(). Tested with jit on/off, lj
2.0.3-august5
I have run into this and I'm not sure if it's a bug or expected
behavior. Do threads have identity like tables?
Different thread objects should compare unequal. It's a bug, if
not. I guess you'll need to come up with a short test case.

--Mike
Cosmin Apreutesei
2014-09-08 22:49:29 UTC
Permalink
Post by Mike Pall
Different thread objects should compare unequal. It's a bug, if
not. I guess you'll need to come up with a short test case.
Ok, I'll try to narrow it down.

Loading...