ntex-rs/ntex

HTTP Client is not Send

Closed this issue · 2 comments

Hey! Thanks for the great project. I have a question about the Client implementation in ntex. Since it is defined as pub struct Client(Rc<ClientConfig>), it cannot be used with tokio::spawn or the JoinSet. I need to upload files to a remote server in parallel. While I could easily write my own client implementation based on hyper, I'd like to avoid code duplication and minimize dependencies. Is there a plan to introduce an HTTP client version with Send (basically without Rc usage) ?
Would it be worth my time to contribute a Send-enabled version of the client?

ntex is !Send. even you make Client to be Send, low level io subsystem is !Send (ie ntex-io). ntex-io is essential part of ntex framework it provides high performance io abstraction and allows to switch async runtimes

I see, I haven't got into the IO implementation yet, thanks for the info.