context.Request() raised data race warnings when run with the race detector. This PR adds a lock to cancelFuncs access.