@Override
public void call() {
// TODO is this actually the end of the thread?
executionHook.onThreadComplete(_self);
endCurrentThread.call();
}
}).unsafeSubscribe(s);
} catch (Throwable t) {
// the run() method is a user provided implementation so can throw instead of using Observable.onError
// so we catch it here and turn it into Observable.error