Carl Lerche

@uKjzclENSpCzVG_lZmMOqg

Joined on Mar 3, 2021

  • struct TaskPool<T> { queue: Queue<T>, consumers: SomeSetOfInFlightTasks, } pub fn new<T>( channel_cap: usize, consumers: usize, handler: Fn(T) -> impl Future<Item = ()> ) -> (Tx, TaskPool<T>) {
     Like  Bookmark
  • To get async functions to show in the backtrace, they must be explicitly annotated: #[tokio::instrument] async fn my_fn() { // code } The instrument macro expands to something like: async fn my_fn() {
     Like  Bookmark