• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

oasisprotocol / oasis-core / #5406

22 Oct 2024 01:37PM UTC coverage: 47.268% (-0.4%) from 47.684%
#5406

Pull #5917

peternose
runtime/src/enclave_rpc/client: Fix panic on drop in async context

The graceful shutdown of active sessions was removed, as they should
not be closed when the RPC client is dropped. Instead, we should
explicitly invoke the appropriate functions.
Pull Request #5917: runtime/src/enclave_rpc/client: Fix panic on drop in async context

4464 of 9444 relevant lines covered (47.27%)

1.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/runtime/src/future.rs
1
//! Helper functions to use with the asynchronous Tokio runtime.
2
use std::future::Future;
3

4
/// Create a new asynchronous Tokio runtime.
5
#[cfg(any(target_env = "sgx", feature = "debug-mock-sgx"))]
6
pub fn new_tokio_runtime() -> tokio::runtime::Runtime {
7
    // In SGX use a trimmed-down version of the Tokio runtime.
8
    //
9
    // Make sure to update THREADS.md if you change any of the thread-related settings.
10
    tokio::runtime::Builder::new_multi_thread()
11
        .worker_threads(6)
12
        .max_blocking_threads(16)
13
        .thread_keep_alive(std::time::Duration::MAX)
14
        .enable_all()
15
        .build()
16
        .unwrap()
17
}
18

19
/// Create a new asynchronous Tokio runtime.
20
#[cfg(not(any(target_env = "sgx", feature = "debug-mock-sgx")))]
21
pub fn new_tokio_runtime() -> tokio::runtime::Runtime {
×
22
    // In non-SGX we use a fully-fledged Tokio runtime.
23
    tokio::runtime::Runtime::new().unwrap()
×
24
}
25

26
/// Runs a future to completion on the current Tokio handle's associated Runtime.
27
pub fn block_on<F: Future>(future: F) -> F::Output {
×
28
    tokio::runtime::Handle::current().block_on(future)
×
29
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc