|
@@ -20,6 +20,7 @@
|
|
|
self.output_queue = defaultdict(list)
|
|
|
self.source = None
|
|
|
self.port = int(sys.argv[1])
|
|
|
+ self.count = 0
|
|
|
|
|
|
self.mvs_operations = {
|
|
|
"CN": self.mvs.create_node,
|
|
@@ -146,6 +147,7 @@
|
|
|
# Blocking or broken, so quit already to stop wasting CPU
|
|
|
break
|
|
|
|
|
|
+ # Could at least execute one instruction, so mark it as "not failed"
|
|
|
self.all_failed = False
|
|
|
|
|
|
# Check that we don't have anything to output yet, otherwise we wait
|
|
@@ -159,7 +161,12 @@
|
|
|
self.all_failed = False
|
|
|
|
|
|
else:
|
|
|
- self.mvs.garbage_collect()
|
|
|
+ if self.count >= 2000:
|
|
|
+ self.count = 0
|
|
|
+ self.mvs.purge()
|
|
|
+ else:
|
|
|
+ self.count += 1
|
|
|
+ self.mvs.garbage_collect()
|
|
|
out = self.mvs.read_outgoing(self.root)[0]
|
|
|
for m in out:
|
|
|
src, user = self.mvs.read_edge(m)[0]
|
|
@@ -171,6 +178,8 @@
|
|
|
continue
|
|
|
self.users.add(name)
|
|
|
self.timeout = self.all_failed
|
|
|
+ if self.timeout:
|
|
|
+ print("FAILED ALL")
|
|
|
self.all_failed = True
|
|
|
</script>
|
|
|
</onentry>
|