mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
initial commit for process scheduler
This commit is contained in:
15
code/controllers/ProcessScheduler/test/testHungProcess.dm
Normal file
15
code/controllers/ProcessScheduler/test/testHungProcess.dm
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* testHungProcess
|
||||
* This process is an example of a simple update loop process that hangs.
|
||||
*/
|
||||
|
||||
/datum/controller/process/testHungProcess/setup()
|
||||
name = "Hung Process"
|
||||
schedule_interval = 30 // every 3 seconds
|
||||
|
||||
/datum/controller/process/testHungProcess/doWork()
|
||||
sleep(1000) // FUCK
|
||||
// scheck is also responsible for handling hung processes. If a process
|
||||
// hangs, and later resumes, but has already been killed by the scheduler,
|
||||
// scheck will force the process to bail out.
|
||||
scheck()
|
||||
Reference in New Issue
Block a user