public void run() { while (!shuttingDown) { final Task t = getTask(); if (t == null) { try { synchronized (this) { if (!shuttingDown && getTask() == null) { wait(); } } } catch (InterruptedException e) { // Do nothing } } else { try { t.run(); resetTask(); repool(Poolable.this); } catch (Throwable e) { remove(Poolable.this); Poolable.this.shutdown(); resetTask(); } } } } };
public void run() { while (!shuttingDown) { final Task t = getTask(); if (t == null) { try { synchronized (this) { if (!shuttingDown && getTask() == null) { wait(); } } } catch (InterruptedException e) { // Do nothing } } else { try { t.run(); resetTask(); repool(Poolable.this); } catch (Throwable e) { remove(Poolable.this); Poolable.this.shutdown(); resetTask(); } } } } };
public void run() { while (!shuttingDown) { final Task t = getTask(); if (t == null) { try { synchronized (this) { if (!shuttingDown && getTask() == null) { wait(); } } } catch (InterruptedException e) { // Do nothing } } else { try { t.run(); resetTask(); repool(Poolable.this); } catch (Throwable e) { remove(Poolable.this); Poolable.this.shutdown(); resetTask(); } } } } };