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
- 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.
- login: "pooryorick"
- mimetype: "text/x-fossil-wiki"