<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>66962</bug_id>
          
          <creation_ts>2011-08-25 11:19:03 -0700</creation_ts>
          <short_desc>WebCore or WTF RunLoop abstraction</short_desc>
          <delta_ts>2012-07-11 16:51:54 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nat Duca">nduca</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>ap</cc>
    
    <cc>dimich</cc>
    
    <cc>enne</cc>
    
    <cc>jamesr</cc>
    
    <cc>jbates</cc>
    
    <cc>levin</cc>
    
    <cc>nduca</cc>
    
    <cc>sam</cc>
    
    <cc>skyul</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>457008</commentid>
    <comment_count>0</comment_count>
    <who name="Nat Duca">nduca</who>
    <bug_when>2011-08-25 11:19:03 -0700</bug_when>
    <thetext>WK2 and Chromium both have embedder-specific abstractions for a thread that runs tasks, e.g.
- WebKit2/platform/RunLoop.h
- WebKit/chromium/public/WebThread.h

I&apos;m wondering if we should have a generalized version of these abstractions available in WebCore.

Two systems that could be refactored to use this:
- WebCore/fileapi/FileThread
- WebCore/platform/chromium/CCThread

Are there other use cases? Should we actually do this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>457633</commentid>
    <comment_count>1</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2011-08-26 10:45:35 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; WK2 and Chromium both have embedder-specific abstractions for a thread that runs tasks, e.g.
&gt; - WebKit2/platform/RunLoop.h
&gt; - WebKit/chromium/public/WebThread.h
&gt; 
&gt; I&apos;m wondering if we should have a generalized version of these abstractions available in WebCore.
&gt; 
&gt; Two systems that could be refactored to use this:
&gt; - WebCore/fileapi/FileThread
&gt; - WebCore/platform/chromium/CCThread
&gt; 
&gt; Are there other use cases? Should we actually do this?

FWIW, the WebKit2 RunLoop class is just a platform abstraction for a system run loop. We also have a WorkQueue class which is a light-weight thread (on OS X it&apos;s actually a libdispatch queue) that can run tasks.

It would definitely be worth moving them down to either WebCore or even WTF.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>457636</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2011-08-26 10:51:16 -0700</bug_when>
    <thetext>&gt; It would definitely be worth moving them down to either WebCore or even WTF.

The tentative plan is to move them to WTF.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>457639</commentid>
    <comment_count>3</comment_count>
    <who name="Nat Duca">nduca</who>
    <bug_when>2011-08-26 10:52:33 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; &gt; It would definitely be worth moving them down to either WebCore or even WTF.
&gt; 
&gt; The tentative plan is to move them to WTF.


Cool. To ask a dumb question, can you have run loops for things != the main thread in the Wk2 abstraction?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>457642</commentid>
    <comment_count>4</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2011-08-26 10:53:35 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; &gt; It would definitely be worth moving them down to either WebCore or even WTF.
&gt; &gt; 
&gt; &gt; The tentative plan is to move them to WTF.
&gt; 
&gt; 
&gt; Cool. To ask a dumb question, can you have run loops for things != the main thread in the Wk2 abstraction?

Yes, the run loop objects are allocated in thread-specific storage.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>457644</commentid>
    <comment_count>5</comment_count>
    <who name="Nat Duca">nduca</who>
    <bug_when>2011-08-26 10:55:34 -0700</bug_when>
    <thetext>Awesome. That sounds like a great building block... is there a bug for that that I should merge this into?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>