锁放在map

typedef struct Mux_t { boost::shared_mutex mux; Mux_t(Mux_t &e){} Mux_t(){} }Mux_s; map MapMux;

    推荐阅读