further work on external async relay
This commit is contained in:
parent
15706e6991
commit
c9e8cafb98
3 changed files with 44 additions and 50 deletions
|
@ -615,9 +615,9 @@ startExternal external =
|
|||
(st, extensions) <- startExternal' external
|
||||
if asyncExtensionEnabled extensions
|
||||
then do
|
||||
v <- liftIO $ runRelayToExternalAsync external st
|
||||
st' <- liftIO $ relayToExternalAsync v
|
||||
store (ExternalAsync v)
|
||||
relay <- liftIO $ runRelayToExternalAsync external st
|
||||
st' <- liftIO $ asyncRelayExternalState relay
|
||||
store (ExternalAsync relay)
|
||||
return st'
|
||||
else do
|
||||
store NoExternalAsync
|
||||
|
@ -627,7 +627,7 @@ startExternal external =
|
|||
fst <$> startExternal' external
|
||||
v@(ExternalAsync relay) -> do
|
||||
store v
|
||||
liftIO $ relayToExternalAsync relay
|
||||
liftIO $ asyncRelayExternalState relay
|
||||
where
|
||||
store = liftIO . atomically . putTMVar (externalAsync external)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue