| Ticket UUID: | 93551c12306c6813de27467b2de99db0a536492b | |||
| Title: | Document that http::geturl processes the event loop without -command | |||
| Type: | Bug | Version: | 8.6 | |
| Submitter: | oehhar | Created on: | 2020-09-07 16:11:57 | |
| Subsystem: | 29. http Package | Assigned To: | nobody | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2020-11-16 14:07:53 | |
| Resolution: | Fixed | Closed By: | oehhar | |
| Closed on: | 2020-11-16 14:07:53 | |||
| Description: |
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:
% socket -server accept 30030
sock040253F8
2 % proc accept args {}
The client asks the server:
% package require http
2.9.1
% catch {http::geturl http://localhost:30030} h
%
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. | |||
| User Comments: |
oehhar added on 2020-11-16 14:07:53:
Committed by checkin [d5e8ce86f0]. | |||