[Piglit] ctrl-c behaviour
eric at anholt.net
Sat Feb 12 11:45:44 PST 2011
On Sat, 12 Feb 2011 11:20:04 -0800, "Eoff, Ullysses A" <ullysses.a.eoff at intel.com> wrote:
> (or at least the ones of interest). In a multithreaded Python program, the main thread
> is the only thread
> that receives the KeyboardInterrupt (at least on Linux). And when subprocesses are
> executing in the main thread, ctrl-c just gracefully (and perhaps magically)
> interrupts that subprocess *only* and allows the rest of the python program to continue
> executing as normal (this is the behavior that piglit originally exhibited). In
> the current threading model, the GPU tests are executed via a threadpool with
> only 1 worker thread (since they shouldn't run concurrent to one another). Managing
> the execution of the GPU tests in a threadpool, then, seems like overkill anyway.
> So moving them to the main thread only adds benefit (namely, the magic ctrl-c
> support for subprocesses executed from the main thread). What's left then is to
> throw all non-gpu-bound tests into their own threadpool. This solution, then,
> supports interrupting GPU tests directly but not the CPU-only tests. That does
> not seem to be an unreasonable sacrifice, though.
This sounds great. I don't think I've seen a parser test hang.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Piglit