I have a class
我上课了
class connection
{
private:
static std::atomic<std::shared_ptr<std::queue<buffer<char> > > > queue_;
std::thread serviceThread_;
std::shared_ptr<std::condition_variable> notEmpty_;
int fileDesc_;
public:
connection(std::shared_ptr<std::condition_variable> notEmpty,
int fileDesc):
serviceThread_(), notEmpty_(notEmpty), fileDesc_(fileDesc)
{
serviceThread_ = std::thread(&connection::service, this);
}
void service();
void join(){ serviceThread_.join(); }
};
class connection
{
priv