‘dispatch’ was not declared in this scope

Hi,
can someone tell me where the dispatch function in this example is located? I simply want to reproduce the example…

Best
Tim