love.thread and non-blocking IO

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
spectralcanine
Citizen
Posts: 65
Joined: Sat Dec 22, 2012 8:17 am

love.thread and non-blocking IO

Post by spectralcanine »

I am making a 2D level editor (aren't we all...), and I have now added a console to it for debugging until I put actual GUI.
I used a separate love.Thread object on a simple file that runs io.read() and sends the input to the main thread.

This is working fine, but I can't see any way to close the console thread automatically from the main thread when quitting. Thread:kill was removed, and I can't send a message because the console is obviously blocked in io.read().
I tried to Google a non-blocking read method, but couldn't find anything.

Is there anything to do about this?
It's kind of annoying to have to press enter in the console after the editor quit already.

Thanks.
Post Reply

Who is online

Users browsing this forum: keharriso and 24 guests