# Interface ThreadDeathEvent

All Superinterfaces:
  `Event, Mirror`

public interface ThreadDeathEvent extends Event
Notification of a completed thread in the target VM. The notification is generated by the dying thread before it terminates. Because of this timing, it is possible for `VirtualMachine.allThreads()` to return this thread after this event is received.

Note that this event gives no information about the lifetime of the thread object. It may or may not be collected soon depending on what references exist in the target VM.

Since:
  1.3
See Also:
  - `EventQueue`
  - `VirtualMachine`
  - `ThreadReference`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ThreadReference`
  `thread()`
  Returns the thread which is terminating.

  ### Methods declared in interface Event

  `request`
  Modifier and Type
  Method
  Description
  `EventRequest`
  `request()`

  ### Methods declared in interface Mirror

  `toString, virtualMachine`
  Modifier and Type
  Method
  Description
  `String`
  `toString()`
  Returns a String describing this mirror
  `VirtualMachine`
  `virtualMachine()`
  Gets the VirtualMachine to which this Mirror belongs.

- ## Method Details

  - ### thread

    ThreadReference thread()
    Returns the thread which is terminating.
    Returns:
      a `ThreadReference` which mirrors the event's thread in the target VM.