To my mind the proper fix (which will probably be my next weekend project) is to remove the Sync
requirement from wrap_stream
by employing the SyncWrapper inside Hyper’s Body
. I consider it highly problematic to require things to be Sync
which don’t need to be, because it communicates an incorrect expectation: the stream (in the example) is not actually shared among multiple threads, the Sync
requirement is incidental. Let’s not pollute the whole ecosystem.
8 Likes