As it stands, there is another problem with the current implementation. If run in wish, it freezes the GUI as the idle events never get to run. I suspect the write event keeps getting queued after an interval of SYNTHETIC_EVENT_TIME which happens to be 0 which means the event queue is never drained. Test io-44.6 which tests the implementation never actually tests that other events are not blocked.

The attached script illustrates this. This is essentially a modified version of io-44.6.

With tclsh 8.6, the time is printed every second

```

1711899031
1711899032
1711899033
1711899034
1711899035
^C
```

With 9.0 however, after the initial invocation the time is never printed

```

1711899100
^C
```

The branch apn-bug-de232b49f2 works properly

```

1711899197
1711899198
1711899199
1711899200
^C
```

Now could one change SYNTHETIC_EVENT_TIME to something other than 0? The comment there says *Must be zero or bad things tend to happen*. Could it possibly do the equivalent of "after idle after 0"? I suspect this will have the same undesirable effect as changing SYNTHETIC_EVENT_TIME and anyways feels like a patch for a patch for fundamentally broken design.

The above illustrates tclsh but the same effect is seen with wish.

```

```

pops up a text widget that can be edited. On the other hand, with the existing 9.0, the text widget is shown but no characters are displayed when you type and the GUI appears frozen.

This. Polling. Based. Design. For. Events. Is. Just. Plain. Wrong.

/Ashok