Skip to content

Commit

Permalink
fix WorkerManager queue error
Browse files Browse the repository at this point in the history
  • Loading branch information
muqiuhan committed Jul 26, 2024
1 parent 7fb036f commit e328158
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/scala/core/WorkerManager.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ object WorkerManager extends CheckInitialized:
end WorkerManager

/// Continuously obtain messages in the queue and forward them to the corresponding channel.
case class Task(id: Int) extends Runnable:
private var _queue: Option[MessageQueue] = None

inline def queue: MessageQueue = _queue.get
case class Task(index: Int) extends Runnable:
private val queue: MessageQueue = QueueManager.get(index)

override def run(): Unit =
scribe.info(s"worker thread of queue ${queue.name} is working")
Expand Down

0 comments on commit e328158

Please sign in to comment.