mailr21097 - /trunk/multi/processor.py


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

Header


Content

Posted by edward on October 14, 2013 - 20:06:
Author: bugman
Date: Mon Oct 14 20:06:24 2013
New Revision: 21097

URL: http://svn.gna.org/viewcvs/relax?rev=21097&view=rev
Log:
Addded a new is_queued() method to the Processor object of the multi package.

This allows the Processor object for the uni and mpi4py multi-processor to be 
queried to see if any
slave commands have been queued.


Modified:
    trunk/multi/processor.py

Modified: trunk/multi/processor.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/multi/processor.py?rev=21097&r1=21096&r2=21097&view=diff
==============================================================================
--- trunk/multi/processor.py (original)
+++ trunk/multi/processor.py Mon Oct 14 20:06:24 2013
@@ -344,6 +344,21 @@
         return time_delta_str
 
 
+    def is_queued(self):
+        """Determine if any slave commands are queued.
+
+        @return:    True if slave commands are in the queue, False otherwise.
+        @rtype:     bool
+        """
+
+        # The standard command queue.
+        if len(self.command_queue):
+            return True
+
+        # Nothing.
+        return False
+
+
     def master_queue_command(self, command, dest):
         """Slave to master processor data transfer - send the result command 
from the slave.
 




Related Messages


Powered by MHonArc, Updated Mon Oct 14 20:20:05 2013