Bug 172160 - [GLib] Use RunLoopSourcePriority::RunLoopTimer as the GSocketMonitor's GSource priority
Summary: [GLib] Use RunLoopSourcePriority::RunLoopTimer as the GSocketMonitor's GSourc...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-15 22:45 PDT by Zan Dobersek
Modified: 2017-05-16 05:57 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.89 KB, patch)
2017-05-15 22:46 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (1.93 KB, patch)
2017-05-16 05:02 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2017-05-15 22:45:57 PDT
[GLib] Use RunLoopSourcePriority::RunLoopTimer as the GSocketMonitor's GSource priority
Comment 1 Zan Dobersek 2017-05-15 22:46:56 PDT
Created attachment 310229 [details]
Patch
Comment 2 Carlos Garcia Campos 2017-05-16 00:58:23 PDT
Comment on attachment 310229 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=310229&action=review

> Source/WebKit2/ChangeLog:11
> +        * Platform/IPC/glib/GSocketMonitor.cpp:
> +        (IPC::GSocketMonitor::start): Explicitly set the priority for the GSocketMonitor's
> +        GSource object to RunLoopSourcePriority::RunLoopTimer, equating the dispatch
> +        priority to that of RunLoop::Timer objects.

I'm not sure this is the priority we want. Messages sent to the io thread will be done by WorkQueue::dispatch which uses the RunLoopDispatcher priority. So, in the case of the GTK+ port this is giving more priority to socket events. We want at least the same priority, or even more to the dispatchs, so that for example a connectionDidClose() message could be dispatched even if the socket has data to read. So, I would use RunLoopDispatcher instead of RunLoopTimer to use the same priority in both GTK+ and WPE ports.
Comment 3 Zan Dobersek 2017-05-16 05:02:59 PDT
Created attachment 310254 [details]
Patch
Comment 4 Zan Dobersek 2017-05-16 05:57:18 PDT
Comment on attachment 310254 [details]
Patch

Clearing flags on attachment: 310254

Committed r216929: <http://trac.webkit.org/changeset/216929>
Comment 5 Zan Dobersek 2017-05-16 05:57:22 PDT
All reviewed patches have been landed.  Closing bug.