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

Re: [femm] deadlock because of WaitForSingleObject



joesixpaq wrote:
Hi Dave

There is a deadlock while executing a lua script because
of WaitForSingleObject(hHandle, INFINITE). It does not
let windows messages through.

Sure you thought about it. So I'd like to know what was your
idea to not use WaitForSingleObject with a finite timeout
in a loop staying inside while it returns WAIT_TIMEOUT meanwhile
letting messages pass?

Doing so, there could be a possibility to halt or to break
the script execution.

Many thanks for your great software!

Dimitri Makhrov
The problem is that most of the time, the lua script is in the middle of doing something,  and its computations tie up the process.  What I really need to do is have lua run in another thread.  Robin Cornelius had been making a lot of progress in that department, but I've been a real lame-o with respect to integrating it into the changes that I'd made (i.e. console window, lua integration with the edit controls).  I should probably devote more attention to integrating this stuff, because not being able to break an executing script w/out killing the process is a real shortcoming.

Dave

-- 
David Meeker
dmeeker@xxxxxxxx
http://femm.berlios.de/dmeeker