remove use of futures and tokio from within client #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This removes an invalid use of futures: previously, the client would
create its own instance of a tokio_core reactor core and synchronously
block on this core while waiting for a response. With recent releases of
futures, this results in the error "cannot recursively call into
Core
". This is discussed attokio-rs/tokio-core#319 and was apparently
never correct behavior.
To solve the problem and continue to use futures, it would be necessary
to allow the client to spawn new futures on an existing executor.
However, because the futures API is in flux right now and the current
behavior was simply to block synchronously on the response anyway, I
simply reverted the use of hyper to an older, pre-futures version and
kept the public API of xml-rpc unchanged.
In the future (e.g. once the futures ecosystem has settled down), it
would be good to remove the blocking wait, but for now this works for
me.