Re: Event loop and http::geturl

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Event loop and http::geturl
De : jonkelly (at) *nospam* fastmail.fm (Jonathan Kelly)
Groupes : comp.lang.tcl
Date : 24. Jun 2025, 09:01:08
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <103dm05$1svqt$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 24/6/25 14:21, Rich wrote:
Jonathan Kelly <jonkelly@fastmail.fm> wrote:
So, it looks like ::http::geturl is operating asynchronously, despite my
program NOT using -command.
 It does.  It is documented as such:
 man n http:
    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.
  The code snippets below are from http-2.9.5.tm which was distributed
(at least) with 8.6.12:
 Buried deep in http::geturl:
          # geturl does EVERYTHING asynchronously, so if the user
         # calls it synchronously, we just do a wait here.
         http::wait $token
 And the implementation of http::wait is:
      proc http::wait {token} {
         variable $token
         upvar 0 $token state
          if {![info exists state(status)] || $state(status) eq ""} {
             # We must wait on the original variable name, not the upvar alias
             vwait ${token}(status)
         }
          return [status $token]
     }
 And the 'vwait' there reenters the event loop and allows other events
to be processed.
OK. Is there a way to ACTUALLY get geturl to block, or equivalent? I need the geturl to finish before anything else happens.

Date Sujet#  Auteur
23 Jun 25 * Event loop and http::geturl17Jonathan Kelly
23 Jun 25 +- Re: Event loop and http::geturl1Jonathan Kelly
24 Jun 25 `* Re: Event loop and http::geturl15Rich
24 Jun 25  `* Re: Event loop and http::geturl14Jonathan Kelly
25 Jun 25   `* Re: Event loop and http::geturl13et99
25 Jun 25    `* Re: Event loop and http::geturl12et99
25 Jun 25     `* Re: Event loop and http::geturl11et99
25 Jun 25      `* Re: Event loop and http::geturl10Jonathan Kelly
25 Jun 25       `* Re: Event loop and http::geturl9Rich
26 Jun 25        `* Re: Event loop and http::geturl8et99
26 Jun 25         +* File processing (was Event loop and http::geturl)2Alan Grunwald
26 Jun 25         i`- Re: File processing (was Event loop and http::geturl)1Ralf Fassel
26 Jun 25         `* Re: Event loop and http::geturl5Rich
26 Jun 25          `* Re: Event loop and http::geturl4Jonathan Kelly
26 Jun 25           `* Re: Event loop and http::geturl3et99
27 Jun 25            `* Re: Event loop and http::geturl2Christian Gollwitzer
27 Jun 25             `- Re: Event loop and http::geturl1Ralf Fassel

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal