Skip to content

Commit

Permalink
buffered chans is what I meant to use
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Nov 15, 2024
1 parent 6457078 commit 72dd80e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions go-runtime/compile/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,13 @@ func Build(ctx context.Context, projectRootDir, stubsRoot string, config modulec
// These two steps take the longest, and only sometimes depend on each other.
// After both have completed, we will scaffold out the build template and only use the optimistic compile
// if the extracted schema has not caused any changes.
extractResultChan := make(chan result.Result[extract.Result])
extractResultChan := make(chan result.Result[extract.Result], 1)
go func() {
logger.Debugf("Extracting schema")
extractResultChan <- result.From(extract.Extract(config.Dir))
}()
optimisticHashesChan := make(chan watch.FileHashes)
optimisticCompileChan := make(chan error)
optimisticHashesChan := make(chan watch.FileHashes, 1)
optimisticCompileChan := make(chan error, 1)
go func() {
hashes, err := fileHashesForOptimisticCompilation(config)
if err != nil {
Expand Down

0 comments on commit 72dd80e

Please sign in to comment.