Commit 17cc1987 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

cherry-pick from readWIPseperatelly. correction to preemptReceiver in CoreObject

parent 7fefcbb6
......@@ -284,7 +284,6 @@ class CoreObject(object):
#===========================================================================
def preemptReceiver(self):
activeObjectQueue=self.Res.users
# find a critical order if any
critical=False
for entity in activeObjectQueue:
......@@ -294,6 +293,8 @@ class CoreObject(object):
break
if critical:
# pick a receiver
receiver=None
if any(object for object in self.next if object.isPreemptive and object.checkIfActive()):
receiver=next(object for object in self.next if object.isPreemptive and object.checkIfActive())
# if there is any receiver that can be preempted check if it is operated
if receiver:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment