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:
@@ -771,6 +771,13 @@ Loop:
|
||||
}
|
||||
// is there another EqualityWrapFuncInvariant with the same Expr1 pointer?
|
||||
for _, fn := range fnInvariants {
|
||||
// XXX: I think we're busy in this loop a lot.
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return nil, ctx.Err()
|
||||
default:
|
||||
// pass
|
||||
}
|
||||
// is this fn.Expr1 related by equivalency graph to eq.Expr1 ?
|
||||
if (eq.Expr1 != fn.Expr1) && !inEquiv(fn.Expr1) {
|
||||
if obj.Debug {
|
||||
|
||||
Reference in New Issue
Block a user