Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 44eb8b88971568abf87f87d03bbf1d554b1e90fc1fbf53a3546e0c7d39c0a733
Ticket: 93551c12306c6813de27467b2de99db0a536492b
Document that http::geturl processes the event loop without -command
User & Date: oehhar on 2020-09-07 16:11:57
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    The http package description contains the paragraph:
    
    The _::http::geturl_ command blocks until the operation completes, unless the -command option specifies a callback that is invoked when the HTTP transaction completes.
    
    IMHO it should be mentioned that the command may process pending events when not called with -command.
    
    An example may be constructed by two wish consoles.
    
    The server does not answer:
    <verbatim>
    % socket -server accept 30030
    sock040253F8
    2 % proc accept args {}
    </verbatim>
    
    The client asks the server:
    <verbatim>
    % package require http
    2.9.1
    % catch {http::geturl http://localhost:30030} h
    
    %
    </verbatim>
    
    On the console, one may press "Enter" to enter additional commands.
    Thus, the http::geturl command probably executed a vwait command and thus processes events.
    
    IMHO the programmer should know when a command may enter the event loop.
    It may also be stated, that the command will not work without event loop, even without the -command switch.
    
    So, a proposed additional remark after the upper paragraph is:
    
    Note: The event queue is even used without the -command option. As a side effect, arbitrary commands may be processed while http::geturl is running.
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "oehhar"
  14. subsystem changed to: "29. http Package"
  15. title changed to:
    Document that http::geturl processes the event loop without -command
    
  16. type changed to: "Bug"