mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
Add infrastructure for testing cancellation.
This commit is contained in:
parent
d1618fe94d
commit
234e0bbc99
@ -82,10 +82,9 @@ parseToAST language Blob{..} = bracket TS.ts_parser_new TS.ts_parser_delete $ \
|
|||||||
let acquire = do
|
let acquire = do
|
||||||
dbg "Starting parse"
|
dbg "Starting parse"
|
||||||
withLock (setStatus InProgress)
|
withLock (setStatus InProgress)
|
||||||
-- Uncomment this if you want to test out cancellation
|
|
||||||
-- threadDelay 6000000
|
|
||||||
enabled <- TS.ts_parser_enabled parser
|
enabled <- TS.ts_parser_enabled parser
|
||||||
dbg ("Parser enabled: " <> show enabled)
|
dbg ("Parser enabled: " <> show enabled)
|
||||||
|
-- Change this to TS.ts_parser_loop_until_cancelled if you want to test out cancellation
|
||||||
TS.ts_parser_parse_string parser nullPtr source len
|
TS.ts_parser_parse_string parser nullPtr source len
|
||||||
|
|
||||||
let release t
|
let release t
|
||||||
|
2
vendor/haskell-tree-sitter
vendored
2
vendor/haskell-tree-sitter
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 9211af29367d2d65dca544f124a32cf919305b7c
|
Subproject commit 00a688d666b3a6595c7be02baa4e83f1919744e8
|
Loading…
Reference in New Issue
Block a user