struct _Worker { _Worker() { pWokerbase=NULL; hThread=INVALID_HANDLE_VALUE; pListConn=NULL; } struct event_base *pWokerbase; HANDLE hThread; _ConnList *pListConn; inline _Conn* GetFreeConn() { _Conn*pItem=NULL; if(pListConn->head!=pListConn->tail) { pItem=pListConn->head; pListConn->head=pListConn->head->next; } return pItem; } inline void PutFreeConn(_Conn *pItem) { pListConn->tail->next=pItem; pListConn->tail=pItem; } };