Helper gcd method for sync calling to main queue.