Ensure project rescan thread is terminated
When changing a project we need to ensure that the old threads are no longer run.
This commit is contained in:
parent
1520c12580
commit
39366d3a09
|
@ -369,13 +369,14 @@ end
|
|||
local function add_dir_scan_thread(dir)
|
||||
core.add_thread(function()
|
||||
while true do
|
||||
print("DEBUG: running rescan on", dir.name)
|
||||
local has_changes = rescan_project_subdir(dir, "")
|
||||
if has_changes then
|
||||
core.redraw = true -- we run without an event, from a thread
|
||||
end
|
||||
coroutine.yield(5)
|
||||
end
|
||||
end)
|
||||
end, dir)
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue