arty 0.6.0

Thread-aware async runtime that keeps each task on one worker thread.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use std::panic::{AssertUnwindSafe, catch_unwind};

use arty_executor::discard_task_panic_payload;

pub(crate) fn discard_panicking_drop<T>(value: T) {
    if let Err(panic) = catch_unwind(AssertUnwindSafe(|| drop(value))) {
        discard_task_panic_payload(panic);
    }
}