Skip to content

Commit

Permalink
Revert StartAsync, start changes
Browse files Browse the repository at this point in the history
  • Loading branch information
knightpp committed Sep 18, 2023
1 parent 817c42b commit 1f0c578
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ func (s *Scheduler) StartBlocking() {

// StartAsync starts all jobs without blocking the current thread
func (s *Scheduler) StartAsync() {
if s.running.CAS(false, true) {
if !s.IsRunning() {
s.start()
}
}

// start starts the scheduler, scheduling and running jobs
func (s *Scheduler) start() {
s.setRunning(true)
s.executor.start()
s.setRunning(true)
s.runJobs(s.jobsMap())
}

Expand Down

0 comments on commit 1f0c578

Please sign in to comment.