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: Meir Yanovich <meiry242_at_gmail.com>
Date: Thu, 3 Apr 2008 07:45:52 +0200

ok if you look in this example you will see that the crul init
function is created inside
the function thread ( like my example )
http://curl.haxx.se/lxr/source/docs/examples/multithread.c
so i guess im doing things right .but it still does not work, why ?

On Thu, Apr 3, 2008 at 7:33 AM, Meir Yanovich <meiry242_at_gmail.com> wrote:
> yeah i know , i did it . and still im getting the same problem ,
> but now i did grep on the examples and saw there is few that are using pthread
> so i will check them also .
>
>
>
> On Wed, Apr 2, 2008 at 9:39 PM, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> > 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-03