Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f539153892e52be8d33d185b082099461c02aa0b3daaa3e5dabd8a20a142eb2a
Ticket: f9800d52bd61f240938dbd3c3c6364c8a6184194
vwait is not NRE-enabled, and yieldto cannot find the right splicing spot
User & Date: pooryorick on 2021-06-20 23:10:13
Changes

  1. icomment:
    The problem is that <code>TclSetTailcall<code> splices the command to be
    yielded to into the right place, but when
    <code>TclNRCoroutineActivateCallback</code> decides the C stack is busy, it
    doesn't go back and undo the splice.  At that point, the splicing spot is
    already taken and any other attempt to yieldto produces the error, "tailcall
    cannot find the right splicing spot: should not happen!".  From here on out,
    that command that hasn't been unspliced behaves like a tailcall:  When the
    coroutine ends that command takes its place.  Tailcall itself doesn't have the
    same problem as yieldto because tailcall uses a slightly different mechanism to
    register the tailcall.  The solution is to undo that splice of the pending
    command if yieldto can't proceed.
    
  2. login: "pooryorick"
  3. mimetype: "text/x-fossil-wiki"