As suggested by @poteto, it seems like useTask might be a good opportunity to integrate with the scheduler package. An initial thought it that some point within perform could schedule the asynchronous work into a lower-priority queue, so that a task being performed based on user input has a good chance of being cancelled. This would be useful, for example, in a system that makes a network request as users type.
Reading into the API more, there are APIs for cancelling scheduled tasks, too. It’s definitely worth investigating how cancelling a task could cancel any scheduled work.
As suggested by @poteto, it seems like
useTask
might be a good opportunity to integrate with thescheduler
package. An initial thought it that some point withinperform
could schedule the asynchronous work into a lower-priority queue, so that a task being performed based on user input has a good chance of being cancelled. This would be useful, for example, in a system that makes a network request as users type.Resources