| To: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
|---|---|
| Subject: | MonkeyBread LibCurl library not "yielding" time to other threads when loading ... can anyone help? |
| From: | Jann Gobble <janngobble@gmail.com> |
| Date: | Tue, 28 Jul 2009 11:14:44 -0700 |
| Authentication-results: | mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com; dkim=neutral (body hash did not verify) header.i=@gmail.com |
| Delivered-to: | listarchive@realsoftware.com |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=Ehjf2HXJKNefpX15Ka6p5owaF23MQTjvt9AR92dpR4A=; b=HtIdITtIy6NwBt7NHwrqHr3/0IAuXj/Tm74vT/d03B9l7HKzOdhWyIGy37KpuvNJns AHnClr37I9EufZ5x+MqBf/D2jFXmD/ECChxz393m0N8CesyHbwLir0AihNk3LMR63wtP h0VtyWG9DxJxMlNTEowvO1sCWulxtuGuNl1do= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=Ri5beE88+8XWlr2YjwS4T0+OssBVvz4j9d8RYheJqv4eQ88q7J48qoa2qyH5kdu9Ue iaBtjAH8uqBuw824OygxBLJnARze0JXJVjy20nuuXnDCvwYTLxw6ndGWpEjtV/B341ng OdNNHbPvD7ne2GTCVsb+JiGNPihcRtGjxjc6c= |
| Reply-to: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
| Sender: | realbasic-nug-bounces@lists.realsoftware.com |
I have posted at MBS list and no response. Please if anyone is using
this libcurl library in RB, can you help?
Here goes:The below code is in a generic http_get function in my project. When I set use_curl to 1 and call this from one of my threads the interface TOTALLY freezes til the "get" is done. When I set use_curl to 0 (and thereby use the httpsocket) it yields just fine. I thought that is what .YieldTime was for? I would MUCH rather use libcurl cos it has more functions and control but now I am not sure. (ps: the _filesize = -1 is just to kill the progress display in the DownloadCURL class. If _filesize > 0 then the progress event displays download percent.) This happens on ALL platforms. Well, Win and OS X... I cannot test on Linux cos EVEN with curl installed on Ubuntu 8.0.4 I get a curl exception error with the plugin...Will troubleshoot that later.
Any Ideas?
HELP!
Jann
dim http_dict as new dictionary
if timeout < 1 then
timeout = 60
end if
if use_curl = 1 then
dim d as new DownloadCURL
d.OptionURL= s
d.OptionTimeOut = timeout
if yield = 1 then
d.YieldTime = true
end if
dim e as integer = d.perform
http_dict.Value("http_content") = d.datas
http_dict.Value("http_content_length") = str( d.datas.len)
http_dict.value("last_errorcode") = str(e)
else
dim content as string
dim sock As new HTTPSocket
if yield = 1 then
sock.Yield = true
end if
http_dict.Value("http_content") = sock.Get( s, timeout )
http_dict.Value("http_content_length") = str(content.Len)
http_dict.value("last_errorcode") = str(sock.LastErrorCode)
end if
return http_dict
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Getting double clicked movies to open with my app?, Greg O'Lone |
|---|---|
| Next by Date: | Re: Showing errors to the user, Charles Ross |
| Previous by Thread: | Zooming in on pictures, jis |
| Next by Thread: | Re: MonkeyBread LibCurl library not "yielding" time to other threads when loading ... can anyone help?, Christian Schmitz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |