Callback which is invoked by the TaskQueue.execute and TaskQueue.execute_async functions.
This is similar to GLib.ThreadFunc, except the delegate can throw exceptions.