co_managed
This lib could create managed sub coroutines.
Managed sub coroutines will be cancelled when their parent exit. This is something like the scoped coroutine creation, the difference is that we manage the sub coroutines in a hash map, so that when sub coroutine exit the entry will be removed dynamically and parent doesn't wait it's children exit.
Usage
First, add this to your Cargo.toml:
[]
= "0.1"
Then just simply implement your http service
use ;
use Manager;
use Duration;
License
This project is licensed under either of the following, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)