Re: possible equality bug with Lua thread objects?

  • From: Mike Pall <mike-1409@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 8 Sep 2014 23:45:12 +0200

Cosmin Apreutesei wrote:
> Is it possible to have thread1 ~= thread2 while tostring(thread1) ==
> tostring(thread2) ?

No.

> 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

Other related posts: