Returning a path instantly instead of waiting for callback

Is there a way to return a path without waiting for the callback?
In the latest version the callback sometimes mysteriously takes a long time (up to 10 seconds) to return the path, I would rather have a simple linear function with no multi-threading as I don’t have a lot of agents in my game.

The 10 second bug might well be related to another user which have had coroutines working very weirdly recently. We have traced it to a (currently thought to be) Unity bug where Time.time or Time.realtimeSinceStartup will be incorrectly set during the first frame in Awake in certain circumstances. This can cause coroutines (which the pathfinding system uses to return paths) to wait a long time before returning the first paths (since a yield return 0 which would normally take on frame, instead takes a roughly random amount of time).

You can request paths back immediately, see http://arongranberg.com/astar/docs/class_astar_path.php#a36de576afe962e470d4379d8c02c2673

p = StartPath (...) AstarPath.active.WaitForPath (p);

Aha I see that makes sense.
Thanks a lot for the answer, that’s very helpful.