TFS has no native support for this. You can tray and invoke TFS API to queue/stop builds using TFS. You can also execute a loop to check if the result from your external server. If it's finished, then continue.
Eg: powershell
$inprocess=true
$loopDelayseconds = 300
while($inprocess)
{
# send request to server and check the result
# if result is finished, set inprocess to false, else call Start-Sleep.
Start-Sleep -s $loopDelayseconds
}
If your tasks is taking a bit more time than usual, you can change the build job timeout in Build definition > General > Build job timeout