$CurrentTask
gives the TaskObject[…] corresponding to the task in which it is being evaluated.
Details
- $CurrentTask is set to the current TaskObject when evaluated within the task object or within a handler function for events generated by the task.
- If evaluated not within a task object, $CurrentTask gives None.
Examples
Basic Examples (4)
Create a task and show available properties:
Print previous and remaining run counts using $CurrentTask:
Wolfram Research (2017), $CurrentTask, Wolfram Language function, https://reference.wolfram.com/language/ref/$CurrentTask.html.
Text
Wolfram Research (2017), $CurrentTask, Wolfram Language function, https://reference.wolfram.com/language/ref/$CurrentTask.html.
CMS
Wolfram Language. 2017. "$CurrentTask." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$CurrentTask.html.
APA
Wolfram Language. (2017). $CurrentTask. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$CurrentTask.html