build dispatch_function only if GCD found