Is there any way to run parallel programmed functions in PowerShell?
Something like:
Function BuildParallel($configuration)
{
    $buildJob = {
        param($configuration)
        Write-Host "Building with configuration $configuration."
        RunBuilder $configuration;
    }
    $unitJob = {
        param()
        Write-Host "Running unit."
        RunUnitTests;
    }
    Start-Job $buildJob -ArgumentList $configuration
    Start-Job $unitJob
    While (Get-Job -State "Running")
    {
        Start-Sleep 1
    }
    Get-Job | Receive-Job
    Get-Job | Remove-Job
}
Does not work because it complains about not recognizing "RunUnitTests" and "RunBuilder", which are functions declared in the same script file. Apparently this happens because the script block is a new context and does not know anything about the scripts declared in the same file.
I could try to use -InitializationScript in Start-Job, but both RunUnitTests and RunBuilder call more functions declared in the same file or referred from other files, so...
I'm sure there's a way to do this, since it's just modular programming (functions, routines and all that stuff).