This must be called while self.lock is held.
(self)
| 1048 | t.start() |
| 1049 | |
| 1050 | def get_request_id(self): |
| 1051 | """ |
| 1052 | This must be called while self.lock is held. |
| 1053 | """ |
| 1054 | try: |
| 1055 | return self.request_ids.popleft() |
| 1056 | except IndexError: |
| 1057 | new_request_id = self.highest_request_id + 1 |
| 1058 | # in_flight checks should guarantee this |
| 1059 | assert new_request_id <= self.max_request_id |
| 1060 | self.highest_request_id = new_request_id |
| 1061 | return self.highest_request_id |
| 1062 | |
| 1063 | def handle_pushed(self, response): |
| 1064 | log.debug("Message pushed from server: %r", response) |
no outgoing calls