From ec27d872622ef790901a59a7f7e84ad139e56e5b Mon Sep 17 00:00:00 2001 From: Xiangdong Lin Date: Mon, 5 Dec 2011 07:48:20 +0000 Subject: [PATCH] Add two public methods for Scheduler Add methods threads() and rootThreadId() for Scheduler to expose threads info to outside world. Signed-off-by: Xiangdong Lin Change-Id: Ifc51a132433c0c120ee45d7b16bfa0ac6592a08a Reviewed-on: https://gerrit.dechocorp.com/26665 Reviewed-by: Andrew Skowronski Reviewed-by: Kevin Cai --- mordor/scheduler.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mordor/scheduler.h b/mordor/scheduler.h index 11bbb21a..56f6ebc9 100644 --- a/mordor/scheduler.h +++ b/mordor/scheduler.h @@ -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 >& 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.