arty 0.5.0

Single-threaded, thread-aware application runtime.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

#![cfg(test)]

use arty::runtime::{BlockingPoolPolicy, Runtime, WorkersPolicy};

pub(crate) fn runtime() -> Runtime {
    Runtime::builder()
        .workers(WorkersPolicy::exactly(1))
        .blocking_pool(BlockingPoolPolicy::shared().max(1))
        .build()
        .unwrap()
}