3 ms·
What is a good example of needing to cancel a promise besides the data fetch scenario? If any other type of async action takes long enough to run to be cancelle
by idibidiart 9y ago
What is a good example of needing to cancel a promise besides the data fetch scenario? If any other type of async action takes long enough to run to be cancelled it would have to be in a worker thread (so it won't run in the UI thread) in which case you can post a message to stop the process (if it's async) or just remove the worker listener if the process is sync and let it finish. Maybe JS needs a way to kill a worker lol