Browse Source

moved readerPollTask to earlier priority

Darren Ranalli 23 years ago
parent
commit
cbefb7dd2c
1 changed files with 5 additions and 2 deletions
  1. 5 2
      direct/src/distributed/ClientRepository.py

+ 5 - 2
direct/src/distributed/ClientRepository.py

@@ -17,6 +17,8 @@ import DirectObject
 class ClientRepository(DirectObject.DirectObject):
 class ClientRepository(DirectObject.DirectObject):
     notify = DirectNotifyGlobal.directNotify.newCategory("ClientRepository")
     notify = DirectNotifyGlobal.directNotify.newCategory("ClientRepository")
 
 
+    TASK_PRIORITY = -30
+
     def __init__(self, dcFileName):
     def __init__(self, dcFileName):
         self.number2cdc={}
         self.number2cdc={}
         self.name2cdc={}
         self.name2cdc={}
@@ -71,7 +73,7 @@ class ClientRepository(DirectObject.DirectObject):
         task = Task.Task(self.rawReaderPollUntilEmpty)
         task = Task.Task(self.rawReaderPollUntilEmpty)
         # Start with empty string
         # Start with empty string
         task.currentRawString = ""
         task.currentRawString = ""
-        taskMgr.add(task, "rawReaderPollTask")
+        taskMgr.add(task, "rawReaderPollTask", priority=self.TASK_PRIORITY)
         return None
         return None
 
 
     def stopRawReaderPollTask(self):
     def stopRawReaderPollTask(self):
@@ -107,7 +109,8 @@ class ClientRepository(DirectObject.DirectObject):
         # Stop any tasks we are running now
         # Stop any tasks we are running now
         self.stopRawReaderPollTask()
         self.stopRawReaderPollTask()
         self.stopReaderPollTask()
         self.stopReaderPollTask()
-        taskMgr.add(self.readerPollUntilEmpty, "readerPollTask")
+        taskMgr.add(self.readerPollUntilEmpty, "readerPollTask",
+                    priority=self.TASK_PRIORITY)
         return None
         return None
 
 
     def stopReaderPollTask(self):
     def stopReaderPollTask(self):