Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
Viscent committed Aug 18, 2018
1 parent b08696c commit d0e33a4
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package io.github.viscent.mtpattern.ch5.tpt;

public class DelegatingTerminatableThread extends AbstractTerminatableThread {
private final Runnable task;

public DelegatingTerminatableThread(Runnable task) {
this.task = task;
}

@Override
protected void doRun() throws Exception {
this.task.run();
}

public static AbstractTerminatableThread of(Runnable task) {
DelegatingTerminatableThread ret = new DelegatingTerminatableThread(
task);
return ret;
}
}

0 comments on commit d0e33a4

Please sign in to comment.