Starting threads with the same name crashes LÖVE

Issue #90 resolved
created an issue

Obviously that's doing it wrong, but maybe it could die a little bit more gracefully.



function love.load() thread_1 = love.thread.newThread("A", "thread.lua") thread_1:start()

thread_2 = love.thread.newThread("A", "thread.lua")

end }}}

Comments (7)

  1. Boolsheet reporter

    It looks like it crashes as soon as you try to interact ( :start(), :wait(), :kill()... ) with the second thread. Even if you just create them, it still crashes on exit. I guess there's some cleanup code that tries to kill the thread or something.

  2. Bill Meltsner

    My initial thought would be to throw an error when trying to create a thread with the same name as an extant, alive thread, since having two with the same name would screw up the entire interface anyway. But you're the threads guy.

  3. Bill Meltsner

    Maybe it's because you're not checking to see if the new thread is NULL (as it would be if the name's the same) and just wrapping it up and sending it into LÖVE as a Thread anyway?

  4. Log in to comment