MCPcopy Create free account
hub / github.com/9miao/CrossApp / lazyInitThreadSemphore

Method lazyInitThreadSemphore

CrossApp/support/network/HttpClient.cpp:430–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430bool CAHttpClient::lazyInitThreadSemphore()
431{
432 if (!s_requestQueue.empty())
433 {
434 return true;
435 }
436 else
437 {
438 pthread_mutex_init(&s_requestQueueMutex, NULL);
439 pthread_mutex_init(&s_responseQueueMutex, NULL);
440
441 pthread_mutex_init(&s_SleepMutex, NULL);
442 pthread_cond_init(&s_SleepCondition, NULL);
443
444 pthread_create(&s_networkThread, NULL, networkThread, this);
445 pthread_detach(s_networkThread);
446
447 need_quit = false;
448 }
449
450 return true;
451}
452
453void CAHttpClient::send(CAHttpRequest* request)
454{

Callers

nothing calls this directly

Calls 2

pthread_mutex_initFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected