-- | Spawn and run a process monad
spawnP :: a -> b -> Process a b () -> IO ThreadId
spawnP c st p = forkIO proc
  where proc = runP c st p >> return ()

-- | Run the process monad for its side effect, with a stopHandler if exceptions
--   are raised in the process
spawnP :: a -> b -> Process a b () -> IO ThreadId
spawnP c st p = forkIO proc
  where proc = runP c st p >> return ()

-- | Run the process monad for its side effect, with a stopHandler if exceptions
--   are raised in the process
spawnP c st p = forkIO proc
  where proc = runP c st p >> return ()

-- | Run the process monad for its side effect, with a stopHandler if exceptions
--   are raised in the process