mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-10-30 15:39:02 -05:00 
			
		
		
		
	Merge pull request #1036 from lioncash/thread
scheduler: Make HaveReadyThreads() a const member function
This commit is contained in:
		| @@ -25,7 +25,7 @@ Scheduler::~Scheduler() { | ||||
|     } | ||||
| } | ||||
|  | ||||
| bool Scheduler::HaveReadyThreads() { | ||||
| bool Scheduler::HaveReadyThreads() const { | ||||
|     std::lock_guard<std::mutex> lock(scheduler_mutex); | ||||
|     return ready_queue.get_first() != nullptr; | ||||
| } | ||||
|   | ||||
| @@ -21,7 +21,7 @@ public: | ||||
|     ~Scheduler(); | ||||
|  | ||||
|     /// Returns whether there are any threads that are ready to run. | ||||
|     bool HaveReadyThreads(); | ||||
|     bool HaveReadyThreads() const; | ||||
|  | ||||
|     /// Reschedules to the next available thread (call after current thread is suspended) | ||||
|     void Reschedule(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 bunnei
					bunnei