当我阅读seastar source code时,我注意到有一个名为tx_side
的联合结构,它只有一个成员。这是解决某些问题的技巧吗?
仅供参考,我将tx_side
结构粘贴到下面:
union tx_side {
tx_side() {}
~tx_side() {}
void init() { new (&a) aa; }
struct aa {
std::deque<work_item*> pending_fifo;
} a;
} _tx;