[Webkit-unassigned] [Bug 72589] [GTK] Expose accessibility hierarchy in WebKit2 to ATK/AT-SPI based ATs
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 4 08:07:19 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=72589
--- Comment #15 from Mario Sanchez Prada <msanchez at igalia.com> 2012-01-04 08:07:19 PST ---
Thanks for the suggestion and the code snippet Carlos. However I have a doubt: do you think this solution (using another thread to kill the main one on timeout) is better/cleaner than the current approach?
I honestly have my doubts... looks to me a bit too complex for something that, in the end, is very simple: I want, _after_ launching the a11y server, to block the current execution until the child process finishes or a timeout has occurred, which is something perfectly doable without using extra threads.
Perhaps I'm missing something... what's your take?
(In reply to comment #14)
> [...]
> static bool kChildFinished = true;
>
> G_GNUC_NORETURN static gpointer timeoutMonitor(gpointer)
> {
> g_usleep(kMaxWaitForChild * G_USEC_PER_SEC);
>
> if (kChildFinished)
> g_thread_exit(0);
>
> g_print("Timeout");
> exit (0);
> }
>
> static void timeoutMonitorStart()
> {
> kChildFinished = false;
> #if (!GLIB_CHECK_VERSION(2,31,0))
> g_thread_create(timeoutMonitor, 0, FALSE, 0);
> #else
> g_thread_new("TimeoutMonitor", timeoutMonitor, 0);
> #endif
> }
>
> static void timeoutMonitorStop()
> {
> kChildFinished = true;
> }
>
> ....
>
> timeoutMonitorStart();
> g_spawn_sync();
> timeoutMonitorStop();
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list