dropbox / pyannotate

Auto-generate PEP-484 annotations
Apache License 2.0
1.42k stars 59 forks source link

Turn a .remove() into a .discard() to avoid race conditions #66

Closed gvanrossum closed 6 years ago

gvanrossum commented 6 years ago

It is apparently possible for multiple threads to reach the same point in the code, both will see event == 'return' and key in call_pending and then both will attempt to remove the pending call.

Hopefully the background thread processing the queue isn't too confused by the duplicated events.