cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: what is the best way to preform http post request every N seconds endlessly

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 2 Apr 2008 12:39:44 -0700

On Wed, Apr 02, 2008 at 08:55:57PM +0200, Meir Yanovich wrote:
> inside the void *PostRequest1(void *threadarg)

It not in the code snipped you showed us. If it's true, then that's a
problem, vis a vis:

       This function is not thread safe. You must not call it
       when any other thread in the program (i.e. a thread shar­
       ing the same memory) is running. This doesn't just mean
       no other thread that is using libcurl. Because
       curl_global_init() calls functions of other libraries that
       are similarly thread unsafe, it could conflict with any
       other thread that uses these other libraries.

You need to call it before you create your threads.
>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-04-02