lang: gapi, unification: Shutdown unification quickly when asked

This is a bit of a hack until we improve the GAPI a bit, but will let us
shut down type unification a bit faster if we want to interrupt a long
running operation. Hopefully our future algorthmic performance
improvements will obliviate the need for this to be a common issue.
This commit is contained in:
James Shubin
2024-03-22 03:21:15 -04:00
parent c4b14ac40d
commit 89784e86bd
3 changed files with 19 additions and 1 deletions

View File

@@ -232,6 +232,7 @@ func (obj *Lang) Init(ctx context.Context) error {
Debug: obj.Debug,
Logf: logf,
}
// NOTE: This is the "real" Unify that runs. (This is not for deploy.)
unifyErr := unifier.Unify(ctx)
obj.Logf("type unification took: %s", time.Since(timing))
if unifyErr != nil {