Article View: pl.comp.lang.pascal
Article #92525Re: [Lazarus] TCurl zawiesza się. Pomocy! Proszę!
From: Terrmit
Date: Wed, 02 Apr 2008 21:28
Date: Wed, 02 Apr 2008 21:28
29 lines
1955 bytes
1955 bytes
Terrmit pisze:
> Tutaj tworzony jest wątek CurlThreadExecute
>> pthread_mutex_init({$IFDEF FPC}@{$ENDIF}fMutex, nil);
>> pthread_create({$IFDEF FPC}@{$ENDIF}fThread, nil, {$IFDEF
>> FPC}@{$ENDIF}CurlThreadExecute, self);
Kolejna wskazówka.
Po 300 wywołaniach (ale czasami po 301, a nawet po 302)
funkcja pthread_create zwraca kod 12 (ENOMEM), czyli
brak pamięci. Czyżby to oznaczało, że wątki nie są kończone
i zjadają pamięć?
Dopisałem pthread_exit(nil) na końcu wątku, ale to nic nie dało :(
> <code>
> function CurlThreadExecute(o:pointer):LongInt; cdecl;
> begin
> with TCurl(o) do begin
> fThdResult:=curl_easy_perform(fCurl);
> fBusy:=False;
> end;
> Result:=0;
pthread_exit(nil);
> end;
> </code>
>
Może jednaj ktoś wpadnie na pomysł, co tu szwankuje?
Sławek
Technical Details
Message-ID:
<ft0tt2$lih$1@atlantis.news.neostrada.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!newsfeed.neostrada.pl!atlantis.news.neostrada.pl!news.neostrada.pl!news.tpi.pl!not-for-mailReferences:
<fssr03$k01$1@atlantis.news.neostrada.pl> <fst2ug$gd3$1@nemesis.news.neostrada.pl> <fstdsc$lcb$1@atlantis.news.neostrada.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!newsfeed.neostrada.pl!atlantis.news.neostrada.pl!news.neostrada.pl!news.tpi.pl!not-for-mail From: Terrmit <terrmitv@poczta.onet.pl> Newsgroups: pl.comp.lang.pascal Subject: Re: [Lazarus] TCurl zawiesza się. Pomocy! Proszę! Date: Wed, 02 Apr 2008 23:28:45 +0200 Organization: TP - http://www.tp.pl/ Lines: 29 Message-ID: <ft0tt2$lih$1@atlantis.news.neostrada.pl> References: <fssr03$k01$1@atlantis.news.neostrada.pl> <fst2ug$gd3$1@nemesis.news.neostrada.pl> <fstdsc$lcb$1@atlantis.news.neostrada.pl> NNTP-Posting-Host: fge166.internetdsl.tpnet.pl Mime-Version: 1.0 X-Trace: atlantis.news.neostrada.pl 1207171810 22097 83.13.160.166 (2 Apr 2008 21:30:10 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Wed, 2 Apr 2008 21:30:10 +0000 (UTC) User-Agent: Thunderbird 2.0.0.12 (X11/20080226) In-Reply-To: <fstdsc$lcb$1@atlantis.news.neostrada.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit