• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java DefaultDaemonThreadFactory类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中gnu.classpath.toolkit.DefaultDaemonThreadFactory的典型用法代码示例。如果您正苦于以下问题:Java DefaultDaemonThreadFactory类的具体用法?Java DefaultDaemonThreadFactory怎么用?Java DefaultDaemonThreadFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

DefaultDaemonThreadFactory类属于gnu.classpath.toolkit包,在下文中一共展示了DefaultDaemonThreadFactory类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: fire

点赞 3

import gnu.classpath.toolkit.DefaultDaemonThreadFactory; //导入依赖的package包/类
/**
 * Send a preference change event to all listeners.  Note that
 * the caller is responsible for holding the node's lock, and
 * for checking that the list of listeners is not null.
 * @param event the event to send
 */
private void fire(final PreferenceChangeEvent event)
{
  for (final PreferenceChangeListener listener : preferenceListeners)
    {
      Runnable dispatcher = new Runnable() {
        public void run()
        {
          listener.preferenceChange(event);
        }
      };

      Executor executor =
        Executors.newSingleThreadExecutor(new DefaultDaemonThreadFactory());
      executor.execute(dispatcher);
    }
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:23,
代码来源:AbstractPreferences.java

示例2: fire

点赞 3

import gnu.classpath.toolkit.DefaultDaemonThreadFactory; //导入依赖的package包/类
/**
 * Send a preference change event to all listeners.  Note that
 * the caller is responsible for holding the node's lock, and
 * for checking that the list of listeners is not null.
 * @param event the event to send
 */
private void fire(final PreferenceChangeEvent event)
{
  for (final PreferenceChangeListener listener : preferenceListeners)
    {
      Runnable dispatcher = new Runnable() {
        public void run()
        {
          listener.preferenceChange(event);
        }
      };
      
      Executor executor =
        Executors.newSingleThreadExecutor(new DefaultDaemonThreadFactory());
      executor.execute(dispatcher);
    }
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:23,
代码来源:AbstractPreferences.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)