Game Development Community

Help in Thread issue for Libcurl

by elvince · in Torque 3D Professional · 08/30/2010 (9:42 am) · 0 replies

Hi all,

We are facing an issue in libcurl implementation, we can't manage a queue with more than 2 items.

I change a little bit the current resource to follow Libcurl multithread implementation but it's still doesn't work.
link

In fact what I found is that in the main thread we are preparing the queue (vector), then start a thread to manage it.
During the queue management, we are looping on the vector and call libcurl perform function to do the job and send the relevant event.
If you have 2 element in the vector: everything is working as expected.
If you have 3 element, the 2 first are working then third one is ignored.

I found that before the 3rd call to ret = curl_easy_perform(_G.curlHandle); the vector (_g.queue) is containing all the remaining element, after this call, the queue vector is empty.

I have no clue how to solve this.

I hope someone in the community are more familiar than me in threading / libcurl and can help.

Thanks,