Devessier / temporal-electronic-signature

Electronic signature demonstration built with Temporal and XState
GNU General Public License v3.0
97 stars 16 forks source link

Add cancellation to custom clock implementation #2

Closed Devessier closed 2 years ago

Devessier commented 2 years ago

If a XState timer is cancelled before Temporal's underlying sleep has expired, the sleep call is not cancelled and will interfere with the state machine in bad ways.

As I show in a repository, implementing clearTimeout is necessary to have an interpreter that properly works with timers.