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:
+2
-1
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user