greghendershott/http — pull request #6 by mflatt (2014-03-27 16:38:40+00:00)
Title: adjust concurrency and custodian handling

Goals:

* Only reuse a connection when the creating and reusing contexts have
the same custodian. Otherwise, a shutdown on the creating custodian
closes the port for the reusing context.

* Avoid locks in favor of a manager thread, to make concurrency handling
kill-safe.

* Add some weak links to avoid memory leaks in the case of
custodian-based shutdowns.

* Fix a subtle race condition between asking a timeout thread to exit
(with an asynchronous request) and checking whether ports are still
open.