Overview
| Artifact ID: | 3355fb6c18eb0a60037658766b1903150d694b9f |
|---|---|
| Ticket: | 1253676fffffffffffffffffffffffffffffffff
http::geturl should not vwait when used asynchronously |
| User & Date: | sbron on 2005-08-07 20:03:55 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed to:
When http::geturl is called with -command and -timeout > 0 it should not vwait for the socket connection to be established. Instead it should return immediately to the caller and do any further actions in event handlers. See also http://wiki.tcl.tk/1255 Here's the original discussion on the Tcler's chat about this subject: [21:30]schelteHow sneaky, http::geturl uses a vwait [21:32]kbk_schelte - But you can get it to return immediately by giving it -command [21:33]schelteThat's what I'm doing. It still uses vwait for opening the socket in -async mode ... [21:35]kbk_Not if -timeout is 0. [21:36]schelteYeah, but of course it isn't. Can't hang up the program because a site cannot be reached. [21:37]kbk_You're right, it would be better to isolate the continuation. Best to log a feature request on that. I tak it that The Right Thing would be to make the part of geturl after line 372 or so into a callback? [21:38]kbk_There doesn't appear to be much state being passed from before that point to after it, so that mightn't even be that difficult. [21:43]schelteThis is only true if both -command and -timeout are specified. [21:43]schelteIf only -timeout is used, the current method will still have to be used. [21:45]kbk_Right. [21:45]kbk_In that case, we should still set up the callback, but then a vwait is appropriate; the caller's asked for it. [21:48]schelteYes, it just makes the code a bit more complicated. [21:49]kbk_Not even that bad - the callback structure would be the same in all cases. It's just a decision that if there is no -command, then vwait before returning.
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "sbron"
- subsystem changed to: "29. http Package"
- title changed to:
http::geturl should not vwait when used asynchronously
- type changed to: "RFE"