From 7152bd677cfc4ea0b33b21b49895e5e049e1b0bd Mon Sep 17 00:00:00 2001 From: hyzboy Date: Tue, 24 Dec 2019 16:49:00 +0800 Subject: [PATCH] split Acquire function of Semaphore --- inc/hgl/thread/Semaphore.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/hgl/thread/Semaphore.h b/inc/hgl/thread/Semaphore.h index fd13885..2408b4a 100644 --- a/inc/hgl/thread/Semaphore.h +++ b/inc/hgl/thread/Semaphore.h @@ -21,7 +21,8 @@ namespace hgl virtual bool Post(int n=1); ///<发送信号 virtual bool TryAcquire(); ///<尝试取得一个信号 - virtual bool Acquire(double time=0.0); ///<等待并获取一个信号 + virtual bool Acquire(); ///<等待并获取一个信号 + virtual bool Acquire(double time); ///<等待并获取一个信号 };//class Semaphore }//namespace hgl #endif//HGL_SEMAPHORE_INCLUDE