Skip to content

Commit

Permalink
Make results execute on a different thread
Browse files Browse the repository at this point in the history
  • Loading branch information
spacez320 committed Aug 23, 2024
1 parent fa9c3fe commit 5ecb22b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cryptarch.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func Run(config lib.Config, displayConfig lib.DisplayConfig) {

// Execute result viewing.
if !config.Silent {
lib.Results(
go lib.Results(
ctx,
lib.DisplayMode(config.DisplayMode),
ctx.Value("queries").([]string)[0], // Always start with the first query.
Expand All @@ -102,5 +102,6 @@ func Run(config lib.Config, displayConfig lib.DisplayConfig) {
// (`lib.Results` does not have any intentional return condition), but it's being left here in
// case in the future we do want to control for query completion.
<-doneQueriesChan
slog.Debug("Received the last result, nothing left to do")
close(doneQueriesChan)
}

0 comments on commit 5ecb22b

Please sign in to comment.