Get the optimized runtime instance with proper error handling
()
| 133 | |
| 134 | /// Get the optimized runtime instance with proper error handling |
| 135 | pub(crate) fn get_runtime() -> &'static Runtime { |
| 136 | GRAPHBIT_RUNTIME |
| 137 | .get_or_init(|| { |
| 138 | let config = RuntimeConfig::default(); |
| 139 | match GraphBitRuntime::new(config) { |
| 140 | Ok(runtime) => runtime, |
| 141 | Err(e) => { |
| 142 | error!("Critical error: Failed to create GraphBit runtime: {}", e); |
| 143 | panic!("Failed to create GraphBit runtime: {}", e); |
| 144 | } |
| 145 | } |
| 146 | }) |
| 147 | .runtime() |
| 148 | } |
| 149 | |
| 150 | /// Initialize runtime with custom configuration |
| 151 | pub(crate) fn init_runtime_with_config(config: RuntimeConfig) -> Result<(), std::io::Error> { |
no test coverage detected