Bug 225361

Summary: [webkitscmpy] Scope classes used in TaskPool to object
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, dewei_zhu, slewis, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=225221
Attachments:
Description Flags
Patch none

Description Jonathan Bedard 2021-05-04 10:41:11 PDT
I found myself needing to access some of TaskPool's helper classes in https://bugs.webkit.org/show_bug.cgi?id=225221 and realized the organization of TaskPool's helper classes needed some improvement.
Comment 1 Radar WebKit Bug Importer 2021-05-04 10:41:39 PDT
<rdar://problem/77514131>
Comment 2 Jonathan Bedard 2021-05-04 10:45:29 PDT
Created attachment 427685 [details]
Patch
Comment 3 dewei_zhu 2021-05-04 14:53:53 PDT
Comment on attachment 427685 [details]
Patch

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

> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:256
> +        cls.queue = queue

Is this used anywhere other than `cls.queue = None`?
Comment 4 Jonathan Bedard 2021-05-04 15:42:20 PDT
Comment on attachment 427685 [details]
Patch

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

>> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:256
>> +        cls.queue = queue
> 
> Is this used anywhere other than `cls.queue = None`?

Not yet.

The motivation for this is to allow worker processes to pass messages to their parent explicitly. This is particularly helpful when running test suites, where we may be able to partially report results to our parent process before finishing the entirety of our shard.
Comment 5 dewei_zhu 2021-05-04 16:29:16 PDT
Comment on attachment 427685 [details]
Patch

r=me
Comment 6 EWS 2021-05-04 17:00:22 PDT
Committed r276997 (237317@main): <https://commits.webkit.org/237317@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427685 [details].