SoFunction
Updated on 2025-04-12

A brief analysis of the problem of preventing jamming with external judgment program in Yiling

In fact, I have been searching for a long time but haven't found a good way to prevent it from getting stuck. If it is a webpage access, the old version of the Lean module has a command integration with delayed timeout. The new one is gone~~ So it's very depressed.

After experimenting with many methods, I finally explored it myself

The method is to force the subroutine to run again with a clock

First, use static variables plus judgment in the subprogram to achieve loop effect

Then set the clock cycle to the time you want to time out and skip it, and then put the enabled thread to run the subroutine, delay for a few seconds, and destroy the thread.

I personally feel that every time the clock runs, it is like loading a memory running thread, running the command to start the subroutine to destroy the subroutine thread. He will run again regardless of whether the program is running or not. And what has not been run before seems to be running slowly in memory, including the delay commands. This will cause stuck, but if you are fake death, you will recover immediately. The efficiency will also become very high.

The editor’s skills are very poor, and these are also feelings and assumptions. I really hope there are experts who come out to give some advice.

However, this method can indeed skip timeout.