private void Run() { while (this.run) { this.action(); } if (this.afterStopAction != null) { this.afterStopAction(); } } }