• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange Webview Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange Webview Problem


  • Subject: Re: Strange Webview Problem
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Wed, 14 Jan 2009 00:23:24 +0100


Le 14 janv. 09 à 00:11, Diez B. Roggisch a écrit :

Nick Zitzmann schrieb:
On Jan 13, 2009, at 3:45 PM, Diez B. Roggisch wrote:
Just for the record - the timoutInterval of 0 is the culprit. I don't have the slightest idea why it stopped working, but I don't care either. It might be worth mentioning in the docs though that passing 0 actually terminates the request immediatly, instead of setting the timeout to unlimited.
That makes sense, actually. If you want the timeout interval to be unlimited, then you should pass in DBL_MAX, which will cause it to time out ~300 million years from now, by which point I assume your computer will no longer be around (or at least you won't be using it)... 0 usually means "do it now" when it comes to time intervals.

But it doesn't mean "do it now", it means "don't do it at all"...

And I disagree that it makes sense - if I didn't want something to happen, I simply wouldn't make the call.

It obviously meant "I don't care" until a few months ago, and I've seen lots of interfaces that behaved that way. Timeouts, resource limits, all those kind of things accept 0 for "turn this option off."

However, it was never documented to work that way, so I don't blame anybody - it's obviously an implementation artifact. And of course I can (and did) set the timout to a ridiculous long interval. Not just as long as you proposed though :)

Diez

Just an example of why 0 does not always mean "no timeout":

man poll
If timeout is greater than zero, it specifies a maximum interval (in milliseconds) to wait for any file descriptor to become ready.
If timeout is zero, then poll() will return without blocking. If the value of timeout is -1, the poll blocks indefinitely.


Else how would you handle this case ?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Strange Webview Problem
      • From: "Diez B. Roggisch" <email@hidden>
References: 
 >Strange Webview Problem (From: "Diez B. Roggisch" <email@hidden>)
 >Re: Strange Webview Problem (From: "Diez B. Roggisch" <email@hidden>)
 >Re: Strange Webview Problem (From: Nick Zitzmann <email@hidden>)
 >Re: Strange Webview Problem (From: "Diez B. Roggisch" <email@hidden>)

  • Prev by Date: Re: Strange Webview Problem
  • Next by Date: Seamlessly converting any type of document to PDF?
  • Previous by thread: Re: Strange Webview Problem
  • Next by thread: Re: Strange Webview Problem
  • Index(es):
    • Date
    • Thread