Start upload and accout for resource consumption.
(self, tpart)
| 27 | self.concurrency_burden = 0 |
| 28 | |
| 29 | def _start(self, tpart): |
| 30 | """Start upload and accout for resource consumption.""" |
| 31 | g = gevent.Greenlet(self.uploader, tpart) |
| 32 | g.link(self._finish) |
| 33 | |
| 34 | # Account for concurrency_burden before starting the greenlet |
| 35 | # to avoid racing against .join. |
| 36 | self.concurrency_burden += 1 |
| 37 | |
| 38 | self.member_burden += len(tpart) |
| 39 | |
| 40 | g.start() |
| 41 | |
| 42 | def _finish(self, g): |
| 43 | """Called on completion of an upload greenlet. |