mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Avoid redundant sparking of the outputs.
This commit is contained in:
parent
c167a2a28e
commit
77e0b635d0
@ -6,7 +6,6 @@ module Semantic
|
||||
, parseBlob
|
||||
) where
|
||||
|
||||
import Control.Parallel.Strategies
|
||||
import qualified Control.Concurrent.Async as Async
|
||||
import Data.Functor.Both
|
||||
import Data.Record
|
||||
@ -71,4 +70,4 @@ parseBlob decorator SourceBlob{..} = decorator source <$> runParser (parserForLa
|
||||
renderConcurrently :: (Monoid output, StringConv output ByteString) => (input -> IO output) -> [input] -> IO ByteString
|
||||
renderConcurrently f diffs = do
|
||||
outputs <- Async.mapConcurrently f diffs
|
||||
pure $ toS (mconcat (outputs `using` parTraversable rseq))
|
||||
pure $ toS (mconcat outputs)
|
||||
|
Loading…
Reference in New Issue
Block a user