Skip to content

Commit 237eb5f

Browse files
committed
Native coroutine ClassLoader be more friendly to dev environment
1 parent 7cfcd39 commit 237eb5f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/java/nginx/clojure/Coroutine.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,7 @@ private boolean isInstrumented(Runnable proto) {
380380
public static void prepareNative() {
381381
useNative = true;
382382
try {
383-
nativeCoroutineBuilder = (NativeCoroutineBuilder) Thread.currentThread().getContextClassLoader()
384-
.loadClass("nginx.clojure.NativeCoroutineBuilderImp").newInstance();
383+
nativeCoroutineBuilder = (NativeCoroutineBuilder) Coroutine.class.forName("nginx.clojure.NativeCoroutineBuilderImp").newInstance();
385384
} catch (Throwable e) {
386385
throw new IllegalStateException("can not load nginx.clojure.NativeCoroutineBuilderImp", e);
387386
}

0 commit comments

Comments
 (0)