gwater / Turmeric.jl
Showing 1 of 1 files from the diff.

@@ -89,12 +89,14 @@
Loading
89 89
        return true
90 90
    end
91 91
92 +
    bisection = bisect(_region)
93 +
92 94
    if generation == maxgeneration
93 -
        append!(buffer.indeterminate_regions, bisect(_region))
95 +
        append!(buffer.indeterminate_regions, bisection)
94 96
        return false
95 97
    end
96 98
97 -
    tasks = map(bisect(_region)) do i
99 +
    tasks = map(bisection) do i
98 100
        Threads.@spawn search(i, generation + 1, maxgeneration)
99 101
    end
100 102
    # we cannot wait for results here because we need to free up the thread
@@ -152,7 +154,7 @@
Loading
152 154
function iterate(search::ThreadedRootSearch, completed = false)
153 155
    completed && return nothing
154 156
    unfinished_regions = pop_unfinished!(search.buffers)
155 -
    completed = search(unfinished_regions)
157 +
    completed = unfinished_regions |> search
156 158
    return collect_regions(search.buffers), completed
157 159
end
158 160
Files Coverage
src 95.83%
Project Totals (6 files) 95.83%