cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Could someone help me or critique me.

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sun, 8 Aug 2004 23:51:38 +0200 (CEST)

On Sun, 8 Aug 2004, Oliver Peek wrote:

> I'm having problems with a memory callback function with pthread. What's
> happening is the data is getting squirrely. I guess it's because pthread is
> multithreaded and then the memory call back is being written-to in different
> threads.

You should make sure that each thread gets its own WRITEDATA pointer to a
unique struct/memory to add data to. Then it doesn't matter that there are
multiple threads transferring multiple files.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-08-08