CancellationToken Support #46
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This was a design decision not to rely on System.Threading namespace. PrimeTween supports async/await simply by adhering to C# language specification. This ensures that PrimeTween can work on platforms that don't support threads, like WebGL. So I'm afraid that there is no support for CancellationToken. The closest alternative is to use tween/sequence.Stop() if you need to interrupt an animation midway. |
Beta Was this translation helpful? Give feedback.
-
Thanks. |
Beta Was this translation helpful? Give feedback.
This was a design decision not to rely on System.Threading namespace. PrimeTween supports async/await simply by adhering to C# language specification. This ensures that PrimeTween can work on platforms that don't support threads, like WebGL.
So I'm afraid that there is no support for CancellationToken. The closest alternative is to use tween/sequence.Stop() if you need to interrupt an animation midway.