Does that help Per OP Request: Functions are identified by pointer. You have no pointer to your anonymous function, so you have nothing to pass to remove() to tell it which function to remove. Simply passing a duplicate function doesn't do it, because the duplicate has a different pointer. You need to stick with assigning the function to a variable, then passing that variable to remove().
I think the issue was by ths following , An asynchronous callback is one where your current thread keeps executing statements, and you detach the execution of code in a different thread to be ran later. There are several technologies to accomplish this. On this example I'm calling the method cacheImage:, with parameter image (just an example) in 4 different asynchronous ways.
seems to work fine Does this timer event wait for three seconds and then callback the function that was passed to the setTimeout method? Or does it just place a timer event on the queue, then go back to function a, invoke b again, and this would place another timer event in the queue.
Trying to pass function callbacks - callbacks don't execute correctly
I hope this helps you . As it turns out, it was a problem with this. I misidentified the root cause. Component A was calling a function on Service S with a callback this.componentACallback Service S correctly called the function componentACallback as needed componentACallback inside Component A in turn, was doing more processing by calling this.doSomeOtherComponentAFunction()