[Pyobjc-dev] Call Objective C method with timeout
Brought to you by:
ronaldoussoren
|
From: st c. <stc...@gm...> - 2008-01-26 19:55:02
|
Sometimes when I call the print function on a WebView it gets into an infinite loop -- it's a WebKit bug. It would be nice if there were a way to call a method but give it a time out: if you take more than 2 seconds, just give up. I assume something like this could be done with threads and setjmp/longjmp/ptrace. I'm aware the state of the webview in question would be dubious afterwards. Has anyone done this? Thanks, Sengan |