The value_to_js resume handler was calling _driveAsync on re-suspension, but the JS driveAsync caller also processes the returned suspension. This caused the second wait in each iteration to fire immediately (0ms) instead of respecting the delay. Fix: resume handler just returns the suspension object, lets the JS driveAsync handle scheduling via setTimeout. Verified: repeat 3 times add/wait 300ms/remove/wait 300ms produces 6 transitions at correct 300ms intervals (1504ms total). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4.8 MiB
4.8 MiB