tingbot / tingbot-python

🔩 Python APIs to write apps for Tingbot
Other
18 stars 9 forks source link

FIx concurrency issues while loading images #28

Closed furbrain closed 8 years ago

furbrain commented 8 years ago

My previous changes to ImageCache would have meant that HTTP requests for files would have had to run sequentially, rather than parallel, if they had been requested in individual threads. This is clearly less than ideal, so I have re-worked the ImageCache class such that thee network access threads are performed outside of the locked part of the procedure, and only the (fairly quick) dictionary manipulations are performed while protected by the lock

joerick commented 8 years ago

Could you merge origin/master on this PR? Want to check TravisCI testing :)

furbrain commented 8 years ago

Ok, have merged it

joerick commented 8 years ago

Hooray!