(self, host, connection, ready)
| 135 | self._readymap = {} # map connection to ready state |
| 136 | |
| 137 | def add(self, host, connection, ready): |
| 138 | self._lock.acquire() |
| 139 | try: |
| 140 | if host not in self._hostmap: self._hostmap[host] = [] |
| 141 | self._hostmap[host].append(connection) |
| 142 | self._connmap[connection] = host |
| 143 | self._readymap[connection] = ready |
| 144 | finally: |
| 145 | self._lock.release() |
| 146 | |
| 147 | def remove(self, connection): |
| 148 | self._lock.acquire() |