This is an archive of the discontinued Mercurial Phabricator instance.

thirdparty: vendor futures 3.2.0
ClosedPublic

Authored by indygreg on Apr 11 2018, 7:42 PM.

Details

Summary

Python 3 has a concurrent.futures package in the standard library
for representing futures. The "futures" package on PyPI is a backport
of this package to work with Python 2.

The wire protocol code today has its own future concept for handling
of "batch" requests. The frame-based protocol will also want to
use futures.

I've heavily used the "futures" package on Python 2 in other projects
and it is pretty nice. It even has a built-in thread and process pool
for running functions in parallel. I've used this heavily for concurrent
I/O and other GIL-less activities.

The existing futures API in the wire protocol code is not as nice as
concurrent.futures. Since concurrent.futures is in the Python standard
library and will presumably be the long-term future for futures in our
code base, let's vendor the backport so we can use proper futures today.

  1. no-check-commit because of style violations

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Apr 11 2018, 7:42 PM
durin42 accepted this revision.Apr 13 2018, 5:34 PM
This revision is now accepted and ready to land.Apr 13 2018, 5:34 PM
This revision was automatically updated to reflect the committed changes.