yihong0618 commented on code in PR #5746:
URL: https://github.com/apache/opendal/pull/5746#discussion_r1990350343
##########
bindings/java/src/executor.rs:
##########
@@ -186,10 +188,11 @@ pub(crate) fn executor_or_default<'a>(
///
/// This function could be only when the lib is loaded.
unsafe fn default_executor<'a>(env: &mut JNIEnv<'a>) -> Result<&'a Executor> {
- RUNTIME.get_or_try_init(|| {
+ Ok(RUNTIME.get_or_init(|| {
make_tokio_executor(
env,
available_parallelism().map(NonZeroUsize::get).unwrap_or(1),
)
- })
+ .expect("Failed to initialize default executor")
Review Comment:
/// This function could be only when the lib is loaded.
since we have this comment I wonder its ok, because maybe it is load time
things, if error happens means this is not load?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]