nimsuggest uses multithreading and full project recompiles

This commit is contained in:
Andreas Rumpf 2017-02-13 13:37:50 +01:00
commit 9f142e199d
6 changed files with 223 additions and 29 deletions

View file

@ -40,9 +40,13 @@ type
# module dependencies.
backend*: RootRef # minor hack so that a backend can extend this easily
config*: ConfigRef
doStopCompile*: proc(): bool {.closure.}
{.this: g.}
proc stopCompile*(g: ModuleGraph): bool {.inline.} =
result = doStopCompile != nil and doStopCompile()
proc newModuleGraph*(config: ConfigRef = nil): ModuleGraph =
result = ModuleGraph()
initStrTable(result.packageSyms)