Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf80e3e4

Browse files
committed
DispatchQueue.threadDetachCallback
1 parent60f5ac6 commitf80e3e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎Sources/JavaJNI.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
// Copyright (c) 2016 John Holdsworth. All rights reserved.
77
//
88

9-
import CJavaVM
109
import Foundation
1110
import Dispatch
11+
import CJavaVM
1212

13-
#if os(Android)
1413
@_silgen_name("JNI_OnLoad")
1514
func JNI_OnLoad( jvm:UnsafeMutablePointer<JavaVM?>, ptr:UnsafeRawPointer)->jint{
1615
JNI.jvm= jvm
1716
letenv=JNI.GetEnv()
1817
JNI.envCache[pthread_self()]= env
1918
JNI.api= env!.pointee!.pointee
20-
DispatchQueue.threadCleanupCallback= JNI_DetachCurrentThread
19+
#if os(Android)
20+
DispatchQueue.threadDetachCallback= JNI_DetachCurrentThread
21+
#endif
2122
returnjint(JNI_VERSION_1_6)
2223
}
23-
#endif
2424

2525
publicfunc JNI_DetachCurrentThread(){
2626
_=JNI.jvm?.pointee?.pointee.DetachCurrentThread(JNI.jvm)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp