Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

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

  1. assignee changed to: "hobbs"
  2. cmimetype changed to: "text/plain"
  3. 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.
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "sbron"
  9. subsystem changed to: "29. http Package"
  10. title changed to:
    http::geturl should not vwait when used asynchronously
    
  11. type changed to: "RFE"