(self, connection)
| 73 | return self.hashMap[hashId].child |
| 74 | |
| 75 | def maybeAddStem(self, connection): |
| 76 | # fewer than MAX_STEMS outbound connections at last reshuffle? |
| 77 | with self.lock: |
| 78 | if len(self.stem) < MAX_STEMS: |
| 79 | self.stem.append(connection) |
| 80 | for k in (k for k, v in self.nodeMap.iteritems() if v is None): |
| 81 | self.nodeMap[k] = connection |
| 82 | for k, v in {k: v for k, v in self.hashMap.iteritems() if v.child is None}.iteritems(): |
| 83 | self.hashMap[k] = Stem(connection, v.stream, self.poissonTimeout()) |
| 84 | invQueue.put((v.stream, k, v.child)) |
| 85 | |
| 86 | |
| 87 | def maybeRemoveStem(self, connection): |
no test coverage detected