Skip to content

Commit

Permalink
Add two public methods for Scheduler
Browse files Browse the repository at this point in the history
Add methods threads() and rootThreadId() for Scheduler to expose threads
info to outside world.

Signed-off-by: Xiangdong Lin <xiangdongl@mozy.com>
Change-Id: Ifc51a132433c0c120ee45d7b16bfa0ac6592a08a
Reviewed-on: https://gerrit.dechocorp.com/26665
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
  • Loading branch information
Xiangdong Lin committed Dec 7, 2011
1 parent fb20652 commit ec27d87
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mordor/scheduler.h
Expand Up @@ -144,6 +144,12 @@ class Scheduler : public boost::noncopyable
/// Change the number of threads in this scheduler
void threadCount(size_t threads);

const std::vector<boost::shared_ptr<Thread> >& threads() const
{
return m_threads;
}

tid_t rootThreadId() const { return m_rootThread; }
protected:
/// Derived classes can query stopping() to see if the Scheduler is trying
/// to stop, and should return from the idle Fiber as soon as possible.
Expand Down

0 comments on commit ec27d87

Please sign in to comment.