Tabnine Logo
Thread.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
java.lang.Thread
constructor

Best Java code snippets using java.lang.Thread.<init> (Showing top 20 results out of 72,261)

origin: square/okhttp

public static ThreadFactory threadFactory(String name, boolean daemon) {
 return runnable -> {
  Thread result = new Thread(runnable, name);
  result.setDaemon(daemon);
  return result;
 };
}
origin: ReactiveX/RxJava

  @Override
  public Thread newThread(Runnable r) {
    return new Thread(r, name);
  }
};
origin: ReactiveX/RxJava

  @Override
  public Thread newThread(Runnable r) {
    return new Thread(r, name);
  }
};
origin: ReactiveX/RxJava

  @Override
  public Thread newThread(Runnable r) {
    return new Thread(r, name);
  }
};
origin: ReactiveX/RxJava

  @Override
  public Thread newThread(Runnable r) {
    return new Thread(r, name);
  }
};
origin: ReactiveX/RxJava

  @Override
  public void execute(Runnable r) {
    new Thread(r).start();
  }
});
origin: ReactiveX/RxJava

  @Override
  public void execute(Runnable r) {
    new Thread(r).start();
  }
});
origin: ReactiveX/RxJava

  @Override
  public void execute(Runnable r) {
    new Thread(r).start();
  }
}, true);
origin: ReactiveX/RxJava

  @Override
  public void execute(Runnable r) {
    new Thread(r).start();
  }
}, true);
origin: ReactiveX/RxJava

  @Override
  public void execute(Runnable r) {
    new Thread(r).start();
  }
}, true);
origin: ReactiveX/RxJava

  @Override
  public void execute(Runnable r) {
    new Thread(r).start();
  }
});
origin: ReactiveX/RxJava

  @Override
  public void subscribe(final Subscriber<? super String> subscriber) {
    subscriber.onSubscribe(new BooleanSubscription());
    new Thread(new Runnable() {
      @Override
      public void run() {
        counter.incrementAndGet();
        subscriber.onNext("one");
        subscriber.onComplete();
      }
    }).start();
  }
}).publish();
origin: ReactiveX/RxJava

  @Override
  public void subscribe(final Subscriber<? super String> subscriber) {
    subscriber.onSubscribe(new BooleanSubscription());
    new Thread(new Runnable() {
      @Override
      public void run() {
        counter.incrementAndGet();
        subscriber.onNext("one");
        subscriber.onComplete();
      }
    }).start();
  }
}).cacheWithInitialCapacity(1);
origin: ReactiveX/RxJava

  @Override
  public void subscribe(final Subscriber<? super String> subscriber) {
    subscriber.onSubscribe(new BooleanSubscription());
    t = new Thread(new Runnable() {
      @Override
      public void run() {
        subscriber.onNext("hello");
        subscriber.onComplete();
      }
    });
    t.start();
  }
}
origin: ReactiveX/RxJava

  @Override
  public void subscribe(final Observer<? super String> observer) {
      observer.onSubscribe(Disposables.empty());
      new Thread(new Runnable() {
        @Override
        public void run() {
          counter.incrementAndGet();
          observer.onNext("one");
          observer.onComplete();
        }
      }).start();
  }
}).replay();
origin: ReactiveX/RxJava

  @Override
  public void subscribe(final Observer<? super String> observer) {
    observer.onSubscribe(Disposables.empty());
    new Thread(new Runnable() {
      @Override
      public void run() {
        counter.incrementAndGet();
        observer.onNext("one");
        observer.onComplete();
      }
    }).start();
  }
}).publish();
origin: ReactiveX/RxJava

  @Override
  public void subscribe(final Observer<? super String> observer) {
      observer.onSubscribe(Disposables.empty());
      new Thread(new Runnable() {
        @Override
        public void run() {
          counter.incrementAndGet();
          observer.onNext("one");
          observer.onComplete();
        }
      }).start();
  }
}).cache();
origin: ReactiveX/RxJava

  @Override
  public void subscribe(final Observer<? super String> observer) {
    observer.onSubscribe(Disposables.empty());
    new Thread(new Runnable() {
      @Override
      public void run() {
        counter.incrementAndGet();
        observer.onNext("one");
        observer.onComplete();
      }
    }).start();
  }
}).cacheWithInitialCapacity(1);
origin: ReactiveX/RxJava

  @Override
  public void subscribe(final Observer<? super String> observer) {
    observer.onSubscribe(Disposables.empty());
    t = new Thread(new Runnable() {
      @Override
      public void run() {
        observer.onNext("hello");
        observer.onComplete();
      }
    });
    t.start();
  }
}
origin: google/guava

private TimedThread(long expectedCompletionWaitMillis) {
 completed = new Completion(expectedCompletionWaitMillis);
 thread = new Thread(new JoinTarget(expectedCompletionWaitMillis));
 thread.start();
}
java.langThread<init>

Javadoc

Allocates a new Thread object. This constructor has the same effect as #Thread(ThreadGroup,Runnable,String) (null, null, gname), where gname is a newly generated name. Automatically generated names are of the form "Thread-"+n, where n is an integer.

Popular methods of Thread

  • currentThread
  • sleep
    Causes the currently executing thread to sleep (temporarily cease execution) for the specified numbe
  • start
    Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread
  • getContextClassLoader
    Returns the context ClassLoader for this Thread. The context ClassLoader is provided by the creator
  • interrupt
    Interrupts this thread. Unless the current thread is interrupting itself, which is always permitted,
  • setDaemon
    Marks this thread as either a #isDaemon thread or a user thread. The Java Virtual Machine exits when
  • getName
    Returns this thread's name.
  • join
    Waits at most millis milliseconds plus nanos nanoseconds for this thread to die. This implementatio
  • setContextClassLoader
    Sets the context ClassLoader for this Thread. The context ClassLoader can be set when a thread is cr
  • setName
    Changes the name of this thread to be equal to the argumentname. First the checkAccess method of thi
  • interrupted
    Tests whether the current thread has been interrupted. Theinterrupted status of the thread is cleare
  • getStackTrace
    Returns an array of stack trace elements representing the stack dump of this thread. This method wil
  • interrupted,
  • getStackTrace,
  • getId,
  • isInterrupted,
  • isAlive,
  • setPriority,
  • yield,
  • getThreadGroup,
  • getPriority

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now