On Fri, Mar 18, 2011 at 16:48, Saqib Ali <[email protected]> wrote: > I would like to serialize calls to the progress callback in this way. The > action I'm taking in the function takes a significant amount of time. So I'm > seeing overlapping calls to the progress function. To deal with this, I've > inserted a mutex
> What I'm seeing is that the mutex lock seems to get ignored. My > assumption/understanding of the cURL multi-stack was that each easy-handle > has its own thread which calls the progress function. Threads within the > same process should respect mutex locks. Is there a gap in my understanding? libcurl doesn't use threads at all. If your application isn't multi-threaded either, you can't get overlapping calls. As to the mutex being ignored: if it's created with PTHREAD_MUTEX_RECURSIVE then it can be locked multiple times by the same thread. Doing that with other mutex types leads to undefined behaviour. ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
