CCHttpClient -- halts when called destroyInstance() -- Android

Hi,

I am calling destroyInstance() but my game halts at this line
pthread_mutex_lock(&s_responseQueueMutex);
I dont have very much good idea of this multi threading in c++. I have to read it in detail

What I am currently doing is that I call too many calls of loading icons on my screen.
So what I want is that when user close that screen I want to invalidate all the request that were sent?

Any idea what should I do for that?

Regards,
Abdul Wasay

I put more logs to check this out
I noticed the code run this part when destroyInstance() is called after the destructor of cchttpclient
// cleanup: if worker thread received quit signal, clean up un-completed request queue

Here there is line written
pthread_exit(NULL);

I put a log previous to this line and after this line, the log above pthread_exit is printed but the below one is not printed
the code cycle then goes to this function

void CCHttpClient::dispatchResponseCallbacks(float delta)
{

CCHttpResponse* response = NULL;
CCLog(“Wasay1:: In dispatch1”);
pthread_mutex_lock(&s_responseQueueMutex);
CCLog(“Wasay1:: In dispatch2”);

……
}

and the last log that is printed is CCLog(“Wasay1:: In dispatch1”);

this one CCLog(“Wasay1:: In dispatch2”); is not printed on console

May be I have explained well, by the way the device I am using is xperia neo sony ericsson

Thats right, i noticed this too, if you do destroyInstance() and try to getInstance()->send() doesn’t work again. It’s a bug.
This is happening in 2.1.4 version , crashes on this line 460: s_requestQueue->addObject(request);

Same issue here.