[webkit-reviews] review granted: [Bug 53477] nrwt multiprocessing: add stubs for manager/worker : [Attachment 81022] remove thread stack code, add better docstrings, clean up imports
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 3 14:10:23 PST 2011
Tony Chang <tony at chromium.org> has granted Dirk Pranke <dpranke at chromium.org>'s
request for review:
Bug 53477: nrwt multiprocessing: add stubs for manager/worker
https://bugs.webkit.org/show_bug.cgi?id=53477
Attachment 81022: remove thread stack code, add better docstrings, clean up
imports
https://bugs.webkit.org/attachment.cgi?id=81022&action=review
------- Additional Comments from Tony Chang <tony at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=81022&action=review
rs=me with the change below
>
Tools/Scripts/webkitpy/layout_tests/layout_package/manager_worker_broker.py:57
> + _multiprocessing_is_available = True
> + from multiprocessing import Process as _Multiprocessing_Process
> + from multiprocessing import Queue as _Multiprocessing_Queue
For feature detection like this, I think it's simpler to just try to import
multiprocessing and on ImportError, set multiprocessing to None. You can then
use multiprocessing in the code to see what queue you should use.
>
Tools/Scripts/webkitpy/layout_tests/layout_package/manager_worker_broker.py:109
> + elif worker_model == 'processes' and _multiprocessing_is_available:
> + queue_class = _Multiprocessing_Queue
> + manager_class = _MultiProcessManager
E.g., this would be:
elif worker_model == 'processes' and multiprocessing:
queue_class = multiprocessing.Queue
manager_class = _MultiProcessManager
>
Tools/Scripts/webkitpy/layout_tests/layout_package/manager_worker_broker_unitte
st.py:37
> +try:
> + _multiprocessing_is_available = True
> + from multiprocessing import Queue as _Multiprocessing_Queue
> +except ImportError:
Same naming as above.
More information about the webkit-reviews
mailing list