remove And Terminate
Removes the entity from the queue and tells it to terminate its process. The process that was suspended because the entity was placed in the queue is immediately terminated.
An entity is in the queue while its process still runs, from when it is placed until the process suspends, and the queue's listeners can see it then. A running process cannot be terminated, so this throws, before anything is removed; check that the entity's currentProcess is not running first.
Parameters
entity
the entity to remove from the queue
wait Stats
if true the waiting time statistics are collected on the usage of the queue. The default is false.