Changeset 78159 in webkit
- Timestamp:
- Feb 9, 2011 4:09:34 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r78157 r78159 1 2011-02-09 Dirk Pranke <dpranke@chromium.org> 2 3 Reviewed by Tony Chang. 4 5 nrwt multiprocessing: minor cleanup prior to implementing the new worker 6 7 This patch renames AbstractManager to ManagerConnection and 8 changes some argument names to be more consistent between 9 manager_worker_broker and message_broker. It also fixes a couple 10 of typos in message_broker. These changes will be tested by code 11 introduced in the next patch. 12 13 https://bugs.webkit.org/show_bug.cgi?id=54067 14 15 * Scripts/webkitpy/layout_tests/layout_package/manager_worker_broker.py: 16 * Scripts/webkitpy/layout_tests/layout_package/message_broker2.py: 17 1 18 2011-02-09 Anders Carlsson <andersca@apple.com> 2 19 -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/manager_worker_broker.py
r77990 r78159 78 78 79 79 80 def get(port, options, manager, worker_class):80 def get(port, options, client, worker_class): 81 81 """Return a connection to a manager/worker message_broker 82 82 … … 84 84 port - handle to layout_tests/port object for port-specific stuff 85 85 options - optparse argument for command-line options 86 manager- object to dispatch replies to86 client - object to dispatch replies to 87 87 worker_class - type of workers to create. This class must implement 88 88 the methods in AbstractWorker. … … 106 106 107 107 broker = message_broker2.Broker(options, queue_class) 108 return manager_class(broker, port, options, manager, worker_class)108 return manager_class(broker, port, options, client, worker_class) 109 109 110 110 … … 137 137 138 138 139 class _ AbstractManager(object):140 def __init__(self, broker, port, options, manager, worker_class):139 class _ManagerConnection(message_broker2.BrokerConnection): 140 def __init__(self, broker, port, options, client, worker_class): 141 141 """Base initialization for all Manager objects. 142 142 … … 145 145 port: handle to port-specific functionality 146 146 options: command line options object 147 manager: Managercallback object (the caller)147 client: callback object (the caller) 148 148 worker_class: class object to use to create workers. 149 149 """ 150 self._broker = broker 150 message_broker2.BrokerConnection.__init__(self, broker, client, 151 MANAGER_TOPIC, ANY_WORKER_TOPIC) 151 152 self._options = options 152 self._manager = manager153 153 self._worker_class = worker_class 154 154 155 155 156 class _InlineManager(_ AbstractManager):156 class _InlineManager(_ManagerConnection): 157 157 pass 158 158 159 159 160 class _ThreadedManager(_ AbstractManager):160 class _ThreadedManager(_ManagerConnection): 161 161 pass 162 162 163 163 164 class _MultiProcessManager(_ AbstractManager):164 class _MultiProcessManager(_ManagerConnection): 165 165 pass -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/message_broker2.py
r77989 r78159 133 133 134 134 def _run_loop(self, topic_name, client, block, delay_secs): 135 queue = self._ find_topic(topic_name)135 queue = self._get_queue_for_topic(topic_name) 136 136 while not client.is_done(): 137 137 try: … … 147 147 "%s: received message '%s' it couldn't handle" % 148 148 (client.name(), message.name)) 149 optargs = message. body149 optargs = message.args 150 150 message_handler = getattr(client, 'handle_' + message.name) 151 151 message_handler(message.src, *optargs)
Note: See TracChangeset
for help on using the changeset viewer.