https://opendal.apache.org/ logo
OpenDAL in blocking context
# general
m
ok let's say I have this: let mut rt = Runtime::new().unwrap(); how would I change my blocking layer init? let op = Operator::new(builder)? .layer(BlockingLayer::create()?) .finish() .blocking();
Please note the
let _guard = RUNTIME.enter();
call
Which inject the async context
m
so I must have a static tokio runtime?
x
The requirement is to keep this runtime existing. You can also store this runtime in your applications somewhere that long enough for all opendal api call.
m
I see. Thank you very much
x
I will polish the docs here a bit to make them more clear