mailr7845 - /branches/multi_processor_merge/multi/multi_processor_base.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 19, 2008 - 21:36:
Author: bugman
Date: Sun Oct 19 21:36:13 2008
New Revision: 7845

URL: http://svn.gna.org/viewcvs/relax?rev=7845&view=rev
Log:
Shifted a class out of order to allow for subclassing.


Modified:
    branches/multi_processor_merge/multi/multi_processor_base.py

Modified: branches/multi_processor_merge/multi/multi_processor_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_processor_merge/multi/multi_processor_base.py?rev=7845&r1=7844&r2=7845&view=diff
==============================================================================
--- branches/multi_processor_merge/multi/multi_processor_base.py (original)
+++ branches/multi_processor_merge/multi/multi_processor_base.py Sun Oct 19 
21:36:13 2008
@@ -64,27 +64,7 @@
     def __init__(self, completed=True):
         pass
 
-
 RESULT_QUEUE_EXIT_COMMAND = Exit_queue_result_command()
-#FIXME: move up a level or more
-#FIXME: move up a level or more
-class Immediate_result_queue(Result_queue):
-    def __init(self, processor):
-        super(Threaded_result_queue, self).__init__(processor)
-
-
-    def put(self, job):
-        super(Immediate_result_queue, self).put(job)
-        try:
-            self.processor.process_result(job)
-        except:
-            traceback.print_exc(file=sys.stdout)
-            # FIXME: this doesn't work because this isn't the main thread so 
sys.exit fails...
-            self.processor.abort()
-
-
-    def run_all(self):
-        pass
 
 
 class Multi_processor(Processor):
@@ -370,6 +350,26 @@
         raise_unimplemented(self.run_all)
 
 
+#FIXME: move up a level or more
+class Immediate_result_queue(Result_queue):
+    def __init(self, processor):
+        super(Threaded_result_queue, self).__init__(processor)
+
+
+    def put(self, job):
+        super(Immediate_result_queue, self).put(job)
+        try:
+            self.processor.process_result(job)
+        except:
+            traceback.print_exc(file=sys.stdout)
+            # FIXME: this doesn't work because this isn't the main thread so 
sys.exit fails...
+            self.processor.abort()
+
+
+    def run_all(self):
+        pass
+
+
 class Threaded_result_queue(Result_queue):
     def __init__(self, processor):
         super(Threaded_result_queue, self).__init__(processor)




Related Messages


Powered by MHonArc, Updated Sun Oct 19 22:00:02 2008