taskCallbackNames            package:base            R Documentation

_Q_u_e_r_y _t_h_e _n_a_m_e_s _o_f _t_h_e _c_u_r_r_e_n_t _i_n_t_e_r_n_a_l _t_o_p-_l_e_v_e_l _t_a_s_k _c_a_l_l_b_a_c_k_s

_U_s_a_g_e:

     getTaskCallbackNames()

_A_r_g_u_m_e_n_t_s:

_V_a_l_u_e:

     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 `addTaskCallback'.

_N_o_t_e:

     This is an experimental feature and the interface may be changed
     in the future.

_S_e_e _A_l_s_o:

     `addTaskCallback' `removeTaskCallback' `taskCallbackManager' <URL:
     http://developer.r-project.org/TaskHandlers.pdf>

_E_x_a_m_p_l_e_s:

       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")

