lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Jun 28, 2012 at 9:16 AM, Alexandre Rion <> wrote:
> Then, later, I want to stop it, so I call watch_thread:kill() (I don't know
> if it is a real good way, but it's the easiest). However, the program freeze
> during the call to the kill function.

Thanks, man - that fixes it.  Killing these threads (and also timers
etc) seems to be a non-elegant way, but it works (I don't know if
there are any long-term resource leaks involved.).  Such threads can
also be suspended with t:suspend().

I've pushed 1.4.2, which now officially has winapi.window_from_handle
and no longer tries to throw an error in the file watcher thread if a
call fails - this is really a nightmare to debug, so it just invokes
the callback with a -1 code and lets the thread die naturally.

Downloads have been updated.

Please submit any more ideas and patches directly to me (or via Github
issues) since not everyone here will be interested in the gory

steve d.