myEStack

Runner

getOptCurrentRunner

If called from within a thread servicing a Runner, returns that
Runner; otherwise it's an external thread and we return null.

There are two kinds of threads which we take to be servicing a Runner.

A RunnerThread created to service a Runner, currently
used for the "headless" and "swt" runnerKinds.

A pre-existing thread servicing a pre-existing event-queue
mechanism, managing some device or system of devices that one
might want to synchronously access from E, or (via callbacks) have
synchronous access to E. This is currently used for the "awt"
runnerKind.

Let's call a thread not servicing a Runner an external
thread, since it is external in some sense to E. (E-language code
and normal ELib code should never execute in an external thread.)
getOptCurrentRunner() == null iff it's invoked from an
external thread.

requireCurrent

addDeadManSwitch

Remember the deadManSwitch, so that if I'm shut down, I can notify
him.

The deadManSwitch is only notified if it's be a boot-ref (a Ref handled
by a BootRefHandler whose target's vat is a vat handled by a
different Runner. Otherwise, the notification would need to occur in
this Runner, which is presumably already shut down.