Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/SMTLIB/Backends/Process.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,16 @@ wait handle = do
waitExitCode $ process handle

-- | Terminate the process, wait for it to actually exit and cleanup its resources.
-- Don't use this if you're manually stopping the solver process by sending an
-- @(exit)@ command. Use `wait` instead.
close :: Handle -> IO ()
close handle = do
cancel $ errorReader handle
stopProcess $ process handle

-- | Create a solver process, use it to make a computation and stop it.
-- Don't use this if you're manually stopping the solver process by sending an
-- @(exit)@ command. Use @\config -> `bracket` (`new` config) `wait`@ instead.
with ::
-- | The solver process' configuration.
Config ->
Expand Down