mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-06-06 22:01:55 +00:00
[bugfix] preempt
This commit is contained in:
parent
72cb0693a5
commit
7c79a7c82e
@ -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()
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user