Open benducke opened 3 years ago
Enable option "threads=" (default: 2) for specifying the number of concurrent operations.
Initial support implemented (so far tested only on Linux): v.net.models
Windows platform is missing a 'sleep' command for thread synchronisation. Win32 has "timeout": https://serverfault.com/questions/432322/how-to-sleep-in-a-batch-file
For the moment, multi-threading is disabled if $SLEEP is not set (see function 'check_setup').
Function model_complete():
It should be straight-forward to run r.cost and r.path in parallel (note that the m:n link packages differ in size for each run through the loop, so the thread run times will decrease linearly):