com.sun.jna.Native.setCallbackThreadInitializer()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(724)

本文整理了Java中com.sun.jna.Native.setCallbackThreadInitializer()方法的一些代码示例,展示了Native.setCallbackThreadInitializer()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Native.setCallbackThreadInitializer()方法的具体详情如下:
包路径:com.sun.jna.Native
类名称:Native
方法名:setCallbackThreadInitializer

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@:@:@");

相关文章

Native类方法