({{, RemoveAsynchronousTask[asyncTask] 
stops asynchronous evaluations and removes asyncTask from the system.}})

OpenersNotesSection(Spacer1)Details

asyncTask must be an active (RefLink[AsynchronousTaskObject, paclet:ref/AsynchronousTaskObject]), as returned by functions like (RefLink[AsynchronousTasks, paclet:ref/AsynchronousTasks]).

Removing an asynchronous task prevents asynchronous evaluations but does not necessarily stop the asynchronous task immediately.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Start two long downloads:

task1=URLFetchAsynchronous["http://exampledata.wolfram.com/20mb.dat",
If[#2==="data",MessageDialog["Download #1 complete."]]&]
task2=URLFetchAsynchronous["http://exampledata.wolfram.com/20mb.dat",
If[#2==="data",MessageDialog["Download #2 complete."]]&]

Remove one of the download tasks using its (RefLink[AsynchronousTaskObject, paclet:ref/AsynchronousTaskObject]) expression:

RemoveAsynchronousTask[task1]

The removed task will no longer be listed:

AsynchronousTasks[]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}})}})