@@ -867,7 +867,7 @@ void io_service::initialize(const io_hostent* channel_eps, int channel_count)
867867 create_channels (channel_eps, channel_count);
868868
869869#if !defined(YASIO_USE_CARES)
870- life_mutex_ = std::make_shared<std ::shared_mutex>();
870+ life_mutex_ = std::make_shared<tlx ::shared_mutex>();
871871 life_token_ = std::make_shared<life_token>();
872872#endif
873873 this ->state_ = io_service::state::IDLE;
@@ -877,7 +877,7 @@ void io_service::finalize()
877877 if (this ->state_ == io_service::state::IDLE)
878878 {
879879#if !defined(YASIO_USE_CARES)
880- std::unique_lock<std ::shared_mutex> lck (*life_mutex_);
880+ std::unique_lock<tlx ::shared_mutex> lck (*life_mutex_);
881881 life_token_.reset ();
882882#endif
883883 destroy_channels ();
@@ -2064,7 +2064,7 @@ void io_service::start_query(io_channel* ctx)
20642064 // init async name query thread state
20652065 auto resolving_host = ctx->remote_host_ ;
20662066 auto resolving_port = ctx->remote_port_ ;
2067- std::weak_ptr<std ::shared_mutex> weak_mutex = life_mutex_;
2067+ std::weak_ptr<tlx ::shared_mutex> weak_mutex = life_mutex_;
20682068 std::weak_ptr<life_token> life_token = life_token_;
20692069 std::thread async_resolv_thread ([this , life_token, weak_mutex, resolving_host, resolving_port, ctx] {
20702070 // check life token
@@ -2079,7 +2079,7 @@ void io_service::start_query(io_channel* ctx)
20792079 auto pmtx = weak_mutex.lock ();
20802080 if (!pmtx)
20812081 return ;
2082- std ::shared_lock<std ::shared_mutex> lck (*pmtx);
2082+ tlx ::shared_lock<tlx ::shared_mutex> lck (*pmtx);
20832083
20842084 // check life token again, when io_service cleanup done, life_token's use_count will be 0,
20852085 // otherwise, we can safe to do follow assignments.
0 commit comments