acl/lib_acl_cpp/include/acl_cpp/stdlib/thread_queue.hpp
2017-06-02 14:47:24 +08:00

31 lines
426 B
C++

#pragma once
#include "../acl_cpp_define.hpp"
struct ACL_AQUEUE;
namespace acl
{
class ACL_CPP_API thread_qitem
{
public:
thread_qitem() {}
virtual ~thread_qitem() {}
};
class ACL_CPP_API thread_queue
{
public:
thread_queue();
~thread_queue();
bool push(thread_qitem* item);
thread_qitem* pop(int wait_ms = -1);
int qlen() const;
private:
ACL_AQUEUE* queue_;
};
} // namespace acl