mirror of
https://github.com/github/semantic.git
synced 2024-12-29 18:06:14 +03:00
Merge pull request #2369 from github/second-wait
Block on async parsing thread after timeout
This commit is contained in:
commit
e15553a97c
@ -85,7 +85,8 @@ parseToAST parseTimeout language Blob{..} = bracket (liftIO TS.ts_parser_new) (l
|
||||
Just (Succeeded ast) -> Just ast <$ trace ("tree-sitter: parsing succeeded " <> blobPath)
|
||||
Nothing -> do
|
||||
trace $ "tree-sitter: parsing timed out " <> blobPath
|
||||
Nothing <$ liftIO (TS.ts_parser_set_enabled parser (CBool 0))
|
||||
liftIO (TS.ts_parser_set_enabled parser (CBool 0))
|
||||
Nothing <$ liftIO (wait parsing)
|
||||
|
||||
|
||||
toAST :: forall grammar . (Bounded grammar, Enum grammar) => TS.Node -> IO (Base (AST [] grammar) TS.Node)
|
||||
|
Loading…
Reference in New Issue
Block a user