diff options
author | Richard Kettlewell <rjk@greenend.org.uk> | 2011-08-29 15:50:35 +0100 |
---|---|---|
committer | Richard Kettlewell <rjk@greenend.org.uk> | 2011-08-29 15:50:35 +0100 |
commit | 974294ad7d083c49bffe9189cac0d5b08984b1ad (patch) | |
tree | 8fce1198c4792f426f2016569124c3c91d366552 /tasks.py | |
parent | 7bcbc2419812f87cf06391da61684df205f131d3 (diff) |
Fix issue 34 (SFTPFile prefetch assumes response order matches requests)
SFTPFile._async_response gets a new 'num' parameter giving the request
number. This can be matched up with the return value of
SFTPClient._async_request() to retrieve data specific to that request.
The prefetch queue SFTPFile._prefetch_reads is replaced with the dict
_prefetch_extents, which maps request numbers to (offset,length)
tuples.
A lock is used to exclude the case where a response arrives in
_async_response before _prefetch_thread has updated it.
Diffstat (limited to 'tasks.py')
0 files changed, 0 insertions, 0 deletions