mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
Name some threads
This commit is contained in:
parent
c3c73c7e24
commit
cdfe3ee7c8
6 changed files with 25 additions and 7 deletions
|
|
@ -764,6 +764,8 @@ namespace np
|
|||
{
|
||||
auto worker_function = [trans_ctx = trans_ctx, req_id, this](std::unique_lock<shared_mutex> lock)
|
||||
{
|
||||
thread_base::set_name("NP Trans Worker");
|
||||
|
||||
auto res = trans_ctx->wake_cond.wait_for(lock, std::chrono::microseconds(trans_ctx->timeout));
|
||||
{
|
||||
std::lock_guard lock_threads(this->mutex_async_transactions);
|
||||
|
|
|
|||
|
|
@ -135,7 +135,8 @@ namespace rpcn
|
|||
|
||||
rpcn_client::rpcn_client()
|
||||
: sem_connected(0), sem_authentified(0), sem_reader(0), sem_writer(0), sem_rpcn(0),
|
||||
thread_rpcn(std::thread(&rpcn_client::rpcn_thread, this)), thread_rpcn_reader(std::thread(&rpcn_client::rpcn_reader_thread, this)),
|
||||
thread_rpcn(std::thread(&rpcn_client::rpcn_thread, this)),
|
||||
thread_rpcn_reader(std::thread(&rpcn_client::rpcn_reader_thread, this)),
|
||||
thread_rpcn_writer(std::thread(&rpcn_client::rpcn_writer_thread, this))
|
||||
{
|
||||
g_cfg_rpcn.load();
|
||||
|
|
@ -152,9 +153,12 @@ namespace rpcn
|
|||
sem_reader.release();
|
||||
sem_writer.release();
|
||||
|
||||
thread_rpcn.join();
|
||||
thread_rpcn_reader.join();
|
||||
thread_rpcn_writer.join();
|
||||
if (thread_rpcn.joinable())
|
||||
thread_rpcn.join();
|
||||
if (thread_rpcn_reader.joinable())
|
||||
thread_rpcn_reader.join();
|
||||
if (thread_rpcn_writer.joinable())
|
||||
thread_rpcn_writer.join();
|
||||
|
||||
disconnect();
|
||||
|
||||
|
|
@ -196,6 +200,8 @@ namespace rpcn
|
|||
// RPCN thread
|
||||
void rpcn_client::rpcn_reader_thread()
|
||||
{
|
||||
thread_base::set_name("RPCN Reader");
|
||||
|
||||
while (true)
|
||||
{
|
||||
sem_reader.acquire();
|
||||
|
|
@ -219,6 +225,8 @@ namespace rpcn
|
|||
|
||||
void rpcn_client::rpcn_writer_thread()
|
||||
{
|
||||
thread_base::set_name("RPCN Writer");
|
||||
|
||||
while (true)
|
||||
{
|
||||
sem_writer.acquire();
|
||||
|
|
@ -241,6 +249,8 @@ namespace rpcn
|
|||
|
||||
void rpcn_client::rpcn_thread()
|
||||
{
|
||||
thread_base::set_name("RPCN Client");
|
||||
|
||||
while (true)
|
||||
{
|
||||
sem_rpcn.acquire();
|
||||
|
|
|
|||
|
|
@ -2494,6 +2494,8 @@ void Emulator::FinalizeRunRequest()
|
|||
{
|
||||
std::thread([this, info = GetEmulationIdentifier()]()
|
||||
{
|
||||
thread_base::set_name("Close Home Menu");
|
||||
|
||||
std::this_thread::sleep_for(2s);
|
||||
|
||||
CallFromMainThread([this]()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue