Make Send bound optional for AsyncTestContext
AsyncTestContext was originally implemented by using #[async_trait::async_trait]. Unfortunately this forces futures to be Send which sometimes unfeasible.
I've added a separate feature to the create async_send which is on by default. This way by default crate behaves identically to previous version. But if you disable this feature then AsyncTestContext will be created with #[async_trait::async_trait(?Send)] which allows futures to be not Send.
I wasn't able to think about any other mechanism other than feature flag. It would be great if you come up with something and it won't be a breaking change.
Alternatively you can change default feature async_send to non-default feature async_nosend, don't know what would be better.
@funbiscuit what is your use case? I think its reasonable that if you use async code, the data you work must implement Send. Otherwise you could run into weird race conditions
I think the case you mention can be solved by just wrapping your types in an Arc. I will close this PR for now and we can reopen a new issue in the future if this is still relevant.