Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 180a478e4e1754f68a5aba3f2095a28f66c1890fadfff3c2af182c48773245f7
Ticket: 3382532fffffffffffffffffffffffffffffffff
Synchronous geturl uses vwait
User & Date: kjnash on 2022-09-10 12:07:04
Changes

  1. closer changed to: "nobody"
  2. icomment:
    The patch no longer works with current http.
    
    The http package now has more asynchronous code than it did when this bug was filed in 2011.  http::Event has been made into a coroutine that yields to the event loop, with the connection made permanently non-blocking, in order to implement HTTP/1.1 pipelining.  Part of http::geturl was given the same treatment in order to prevent blocking during socket connection.  Many users want http::geturl to be asynchronous and to avoid long-running events that block a return to the event loop.
    
    These recent revisions are not needed for a synchronous HTTP connection.  The simplest way to implement synchronous http::geturl would be to use an earlier version of http with the patch provided by ferrieux.  However, the issues with -queryprogress, -querychannel, -channel, and -timeout would remain.
    
    An alternative might be to use a synchronous thread::send to run http::geturl asynchronously in another thread.  However there will be issues about how much of the script would need to be accessible to the thread running geturl.  The -proxyfilter, -progress and -queryprogress commands, the file sockets used by -channel and -querychannel, cookies, TLS and the certificate store, etc.
    
    I do not see an easy way to do synchronous http::geturl without the vwait nesting problem.
    
  3. login: "kjnash"
  4. mimetype: "text/plain"
  5. severity changed to: "Minor"