Terminal - how to finish one terminal.subprocess.run before starting another?

I think it’s run in async?

import panel as pn
pn.extension()

terminal = pn.widgets.Terminal()
terminal.subprocess.run(some_long_running_cmd)
terminal.subprocess.run(a_cmd_that_depends_on_previous)