The first 3xMine from gas command will wait for the first refinery to finish, however the second 3xMine from gas command does not wait for the second refinery. Since there is no reason to ever have more than 3 workers on one gas, mine from gas commands should wait for sufficient free refineries before running.
Example:
https://burnysc2.github.io/sc2-planner/?&race=terran&bo=uDritmrisSJEritSf2HtL2NtZU2HsKI2PtkuBtgV2KritjkilTkli2MuFsExdkxcJtR2ZtZfexZbtNuF
The first 3xMine from gas command will wait for the first refinery to finish, however the second 3xMine from gas command does not wait for the second refinery. Since there is no reason to ever have more than 3 workers on one gas, mine from gas commands should wait for sufficient free refineries before running.