if (this.associateTaskWithThread) {
// associate task with the thread
Thread thread = Thread.currentThread();
if (thread instanceof ManagedThread) {
ManagedThread managedThread = (ManagedThread)thread;
managedThread.startTask(this);
} else {
LOG.warn("taskStart was not called on ManagedThread: " + thread);
}
}
}