2025-09-15 09:30:56 +08:00
|
|
|
|
package com.simulationservice.service;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
import java.lang.*;
|
2025-09-15 09:37:46 +08:00
|
|
|
|
import com.simulationservice.util.CustomThread;
|
2025-09-15 09:30:56 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 保障任务线程,用于处理需求消耗生成的保障需求
|
|
|
|
|
|
*/
|
|
|
|
|
|
public class TaskThread extends CustomThread {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void processBuss() {
|
|
|
|
|
|
|
|
|
|
|
|
if (max < 0) max = 1000;
|
|
|
|
|
|
max--;
|
|
|
|
|
|
String info = String.valueOf(max) + " " + getRoomId();
|
|
|
|
|
|
try {
|
|
|
|
|
|
WebSocketServer.sendInfo(info, "2222");
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|