asynchronous cancelling, which isn't ideal (see man page pthread_setcanceltype for details). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8680 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
d1400c4c10
commit
f83cbe28bb
@ -100,6 +100,9 @@ void NetworkHttp::startNetworkThread()
|
|||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
pthread_attr_init(&attr);
|
pthread_attr_init(&attr);
|
||||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
|
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
|
||||||
|
// Should be the default, but just in case:
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||||
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||||
|
|
||||||
m_thread_id.setAtomic(new pthread_t());
|
m_thread_id.setAtomic(new pthread_t());
|
||||||
int error = pthread_create(m_thread_id.getData(), &attr,
|
int error = pthread_create(m_thread_id.getData(), &attr,
|
||||||
|
Loading…
Reference in New Issue
Block a user