acl/lib_fiber/cpp/include/fiber/fiber_event.hpp

40 lines
636 B
C++
Raw Normal View History

2017-09-22 12:27:21 +08:00
#pragma once
struct ACL_FIBER_EVENT;
namespace acl {
/**
2018-01-06 23:18:40 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Э<EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD>߳<EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>Э<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD>֮<EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>ȴ<EFBFBD>/֪ͨ<EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2017-09-22 12:27:21 +08:00
*/
class fiber_event
{
public:
fiber_event(void);
~fiber_event(void);
/**
2018-01-06 23:18:40 +08:00
* <EFBFBD>ȴ<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>
* @return {bool} <EFBFBD><EFBFBD><EFBFBD><EFBFBD> true <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2017-09-22 12:27:21 +08:00
*/
bool wait(void);
/**
2018-01-06 23:18:40 +08:00
* <EFBFBD><EFBFBD><EFBFBD>Եȴ<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>
* @return {bool} <EFBFBD><EFBFBD><EFBFBD><EFBFBD> true <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD>ռ<EFBFBD><EFBFBD>
2017-09-22 12:27:21 +08:00
*/
bool trywait(void);
/**
2018-01-06 23:18:40 +08:00
* <EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪ͨ<EFBFBD>ȴ<EFBFBD><EFBFBD><EFBFBD>
* @return {bool} <EFBFBD><EFBFBD><EFBFBD><EFBFBD> true <EFBFBD><EFBFBD>ʾ֪ͨ<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2017-09-22 12:27:21 +08:00
*/
bool notify(void);
private:
ACL_FIBER_EVENT* event_;
};
} // namespace acl