\HeaderA{taskCallbackNames}{Query the names of the current internal top-level task callbacks}{taskCallbackNames}
\aliasA{getTaskCallbackNames}{taskCallbackNames}{getTaskCallbackNames}
\keyword{environment}{taskCallbackNames}
\begin{Description}\relax
This provides a way to get the names (or identifiers)
for the currently registered task callbacks
that are invoked at the conclusion of each top-level task.
These identifiers can be used to remove a callback.
\end{Description}
\begin{Usage}
\begin{verbatim}
getTaskCallbackNames()
\end{verbatim}
\end{Usage}
\begin{Value}
A character vector giving the name for each of the
registered callbacks which are invoked when
a top-level task is completed successfully.
Each name is the one used when registering
the callbacks and returned as the in the
call to \code{\LinkA{addTaskCallback}{addTaskCallback}}.
\end{Value}
\begin{Note}\relax
One can use \code{\LinkA{taskCallbackManager}{taskCallbackManager}}
to manage user-level task callbacks,
i.e., S-language functions, entirely within
the S language and access the names
more directly.
\end{Note}
\begin{SeeAlso}\relax
\code{\LinkA{addTaskCallback}{addTaskCallback}},
\code{\LinkA{removeTaskCallback}{removeTaskCallback}},
\code{\LinkA{taskCallbackManager}{taskCallbackManager}}\bsl{}
\url{http://developer.r-project.org/TaskHandlers.pdf}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
 n <- addTaskCallback(function(expr, value, ok, visible) {
                        cat("In handler\n")
                        return(TRUE)
                      }, name = "simpleHandler")

 getTaskCallbackNames()

   # now remove it by name
 removeTaskCallback("simpleHandler")

 h <- taskCallbackManager()
 h$add(function(expr, value, ok, visible) {
                        cat("In handler\n")
                        return(TRUE)
                      }, name = "simpleHandler")
 getTaskCallbackNames()
 removeTaskCallback("R-taskCallbackManager")
\end{ExampleCode}
\end{Examples}

