Package net.i2p.util

Class I2PThread

java.lang.Object
java.lang.Thread
net.i2p.util.I2PThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
DHSessionKeyBuilder.PrecalcRunner, Elg2KeyFactory, I2PAppThread, JobQueueRunner, X25519KeyFactory

public class I2PThread
extends Thread
Preferred over Thread for all router uses. For applications, I2PAppThread is preferred.

Provides the following features:

  • Logging to wrapper log on unexpected termination in run().
  • Notification of OOM to registered listener (the router), which will cause logging to the wrapper log and a router restart
  • Catching and logging "OOM" caused by thread limit in start() with distinct message, and does not call the OOM listener.
  • As of 0.9.21, initialization to NORM_PRIORITY (not the priority of the creating thread).