Skip to content

Commit

Permalink
Threading: Get rid of the 10 seconds timer spamming the log.
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeyl committed Oct 22, 2024
1 parent 81c87c2 commit 52da100
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/CornucopiaCore/Threading/RunLoopThread.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public extension Cornucopia.Core {
assert(self == Thread.current)
self.loop = RunLoop.current
assert(self.loop != RunLoop.main)

self.timer = .init(timeInterval: 10.0, target: self, selector: #selector(self.onTimerFired), userInfo: nil, repeats: true)
// We're scheduling a timer that will never fire, since runloops without at least a single source immediately return from `CFRunLoopRun()`
self.timer = .init(timeInterval: 864000, target: self, selector: #selector(self.onTimerFired), userInfo: nil, repeats: false)
self.loop.add(self.timer, forMode: RunLoop.Mode.common)

logger.trace("Entering runloop")
Expand Down

0 comments on commit 52da100

Please sign in to comment.