1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-07 14:21:55 +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 mu sync.Mutex
scheduling sync.Mutex scheduling sync.Mutex
jobMasters map[string]*JobManager jobMasters map[string]*JobManager
enabled bool enabled bool
parallelism int parallelism int
} }
@ -23,7 +23,7 @@ func (scheduler *SchedulerFCFS) Start() {
go func() { go func() {
for { for {
log.Info("Scheduling") log.Debug("Scheduling")
time.Sleep(time.Second * 5) time.Sleep(time.Second * 5)
scheduler.scheduling.Lock() scheduler.scheduling.Lock()
scheduler.mu.Lock() scheduler.mu.Lock()

View File

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