feat: 状态机内置默认用于异步执行事件的线程池.
This commit is contained in:
@@ -21,9 +21,8 @@ public class MachineTest {
|
||||
@Test
|
||||
public void testStandardStateMachine() throws Exception {
|
||||
StateMachine<PrinterState> stateMachine = StateMachineBuilder.from(PrinterState.values())
|
||||
.async(false)
|
||||
.async(true)
|
||||
.standard()
|
||||
.executor(Executors.newFixedThreadPool(16))
|
||||
.whenLeave(PrinterState.IDLE, h -> {
|
||||
System.out.println(Thread.currentThread().getName() + ": leave IDLE");
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user