Tried to fix ticket #235 (and probably #245), though it uses

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:
hikerstk 2011-05-23 12:32:41 +00:00
parent d1400c4c10
commit f83cbe28bb

View File

@ -100,6 +100,9 @@ void NetworkHttp::startNetworkThread()
pthread_attr_t attr;
pthread_attr_init(&attr);
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());
int error = pthread_create(m_thread_id.getData(), &attr,