mirror of
https://github.com/facebook/Haxl.git
synced 2024-12-23 00:31:32 +03:00
Add a warning about concurrent runHaxl calls
Reviewed By: malmerey Differential Revision: D13067528 fbshipit-source-id: 08ba93fda2f6518eaedea0956d198a59255b16d9
This commit is contained in:
parent
24494b5e31
commit
4638736ac6
@ -36,6 +36,14 @@ import Haxl.Core.Stats
|
||||
-- runHaxl
|
||||
|
||||
-- | Runs a 'Haxl' computation in the given 'Env'.
|
||||
--
|
||||
-- Note: to make multiple concurrent calls to 'runHaxl', each one must
|
||||
-- have a separate 'Env'. A single 'Env' must /not/ be shared between
|
||||
-- multiple concurrent calls to 'runHaxl', otherwise deadlocks or worse
|
||||
-- will likely ensue.
|
||||
--
|
||||
-- However, multiple 'Env's may share a single 'StateStore', and thereby
|
||||
-- use the same set of datasources.
|
||||
runHaxl :: forall u a. Env u -> GenHaxl u a -> IO a
|
||||
runHaxl env@Env{..} haxl = do
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user