本文整理了Java中com.sun.jna.Native.setCallbackThreadInitializer()
方法的一些代码示例,展示了Native.setCallbackThreadInitializer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Native.setCallbackThreadInitializer()
方法的具体详情如下:
包路径:com.sun.jna.Native
类名称:Native
方法名:setCallbackThreadInitializer
[英]Set a thread initializer for the given callback.
[中]为给定回调设置线程初始值设定项。
代码示例来源:origin: uk.co.caprica/vlcj
private NativeLogCallback() {
Native.setCallbackThreadInitializer(this, new CallbackThreadInitializer(true, false, "log-events"));
}
代码示例来源:origin: gstreamer-java/gst1-java-core
public synchronized <T> void connect(String signal, Class<T> listenerClass, T listener, Callback cb) {
Native.setCallbackThreadInitializer(cb, cbi);
addCallback(listenerClass, listener, new SignalCallback(signal, cb));
}
代码示例来源:origin: com.googlecode.gstreamer-java/gstreamer-java
public synchronized <T> void connect(String signal, Class<T> listenerClass, T listener, Callback cb) {
Native.setCallbackThreadInitializer(cb, cbi);
addCallback(listenerClass, listener, new SignalCallback(signal, cb));
}
代码示例来源:origin: com.dukescript.presenters/renderer
objC.class_addMethod(appDelClass, objC.sel_getUid("applicationDidFinishLaunching:"), appDidStart, "i@:@");
doMainSelector = objC.sel_getUid("doMain");
Native.setCallbackThreadInitializer(this, new CallbackThreadInitializer(false, false, "Cocoa Dispatch Thread"));
objC.class_addMethod(appDelClass, doMainSelector, this, "i@");
objC.class_addMethod(appDelClass, objC.sel_getUid("webView:didCreateJavaScriptContext:forFrame:"), contextCreated, "v@:@:@");
内容来源于网络,如有侵权,请联系作者删除!