Serialize loading functions backend for Functions Emulator to avoid race conditions. (#4492)
Serialize loading functions backend for Functions Emulator to avoid race conditions. (#4492)

Container contract based function trigger discovery process spins up a control API server to announce /functions.yaml. When we load multiple functions backend in parallel, they sometimes end up having conflict over port. Serializing the load resolves the issue, but slows down the overall loading process.

Slowdown may be a big hit to extensions emulator, delaying the emulator initialization by few more seconds. Setting up a PR to discuss changes.
firebase/firebase-tools,firebase/firebase-tools,firebase/firebase-tools,firebase/firebase-tools,firebase/firebase-tools