<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement RunLoop::runNowIfMainThreadOrDispatch"
   href="https://bugs.webkit.org/show_bug.cgi?id=159626#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement RunLoop::runNowIfMainThreadOrDispatch"
   href="https://bugs.webkit.org/show_bug.cgi?id=159626">bug 159626</a>
              from <span class="vcard"><a class="email" href="mailto:calvaris&#64;igalia.com" title="Xabier Rodríguez Calvar &lt;calvaris&#64;igalia.com&gt;"> <span class="fn">Xabier Rodríguez Calvar</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=159626#c1">comment #1</a>)
<span class="quote">&gt; It's been a few times before that I wanted such functionality, but then
&gt; convinced myself that it shouldn't be added. It would be pretty hard to know
&gt; about code without knowing whether a block executes right away or races with
&gt; other code in the function.</span >

Yes, I understand the concern, which is not that important if you use a debugger and step into the function to see if it is run immediately. We write functions because they are a way to avoid duplicating code. The block:

if (isMainThread()) {
// do
} else
 RunLoop()...

happens a lot and I think it can be simplified in many places.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>