Skip to content

thread handling

kmalloc edited this page Jun 18, 2013 · 1 revision
  1. Thread.cc simple wrapper of pthread. Thread::Run() is the main function running in the thread.

Thread::Run() simply executing ITask. so every Thread executing ITask.

2)worker.cc

Worker is descendant of Thread.

every Worker has a ITask queue.

Worker always run whatever ITask in the queue until it is stopped.

Clone this wiki locally