1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-06 05:51:54 +00:00

[bugfix] preempt

This commit is contained in:
Newnius 2020-08-13 20:44:32 +08:00
parent 72cb0693a5
commit 7c79a7c82e
2 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ type SchedulerFCFS struct {
mu sync.Mutex
scheduling sync.Mutex
jobMasters map[string]*JobManager
jobMasters map[string]*JobManager
enabled bool
parallelism int
}
@ -23,7 +23,7 @@ func (scheduler *SchedulerFCFS) Start() {
go func() {
for {
log.Info("Scheduling")
log.Debug("Scheduling")
time.Sleep(time.Second * 5)
scheduler.scheduling.Lock()
scheduler.mu.Lock()

View File

@ -143,6 +143,7 @@ func (scheduler *SchedulerPriority) Start() {
if after != before {
break
}
log.Info("before=", before, " after=", after)
time.Sleep(time.Millisecond * 100)
}
}