Skip to content

Commit 49f3f06

Browse files
Merge pull request #22 from tweag/qa/doc
`Process`: state that `close` and `wait` shouldn't be used along with an `(exit)` command
2 parents 6aeb3de + 123bc06 commit 49f3f06

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/SMTLIB/Backends/Process.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,16 @@ wait handle = do
112112
waitExitCode $ process handle
113113

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

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

0 commit comments

Comments
 (0)