Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4a9052bba4fee24452c0ed2e6903a29040f8c9101177a53acbba0379b26e5da1
Ticket: 858404314692d758d1aba126ac6dd0c448c1de3b
Windows: after and Tcl_Sleep can sleep about 72 minutes
User & Date: jan.nijtmans on 2026-10-17 06:51:49
Changes

  1. assignee changed to: "aku"
  2. closer changed to: "nobody"
  3. comment changed to:
    In the retry loop of Tcl_Sleep() (win/tclWinNotify.c), vdelay.usec = desired.usec - now.usec is negative when the remaining time crosses a second boundary, and <nowiki>(unsigned long)vdelay.usec / 1000</nowiki> turns it into about 4294967 ms, so SleepEx() waits about 71.6 minutes. The loop runs when SleepEx() wakes before Tcl's clock reaches the target, which happens easily on virtual machines: a 9.0.5 tclsh and its children all hung in <nowiki>[after 8000]</nowiki> for more than 10 minutes on a Windows 11 VM.
    
    The cast came with [837dbec7cc]. 8.6 (signed arithmetic) and 9.1 (TIP 723) are not affected.
    
  4. icomment:
    +1
    
    Please go ahead
    
  5. login: "jan.nijtmans"
  6. mimetype: "text/x-fossil-wiki"