CodePudding user response:
Look at your machine number of threads, multicore multi-threading, multiple tasks in parallel run fast ah, of course, of course, a former problem, large amount of data, after cannot achieve maximum database I/O,CodePudding user response:
General multiple timing task is to perform different time zones, each time the task is a thread to operate, so and you also declare four threads to run this stuff is the same, and I think will be more expensive,Four tasks=4 thread model, only 4 thread work
Four tasks=4 timing task model, four threads + 4 timing task
Feeling is the second efficiency is low, if you have different opinions, welcome to discuss,
I feel like your this kind of demand, with a task + multithreading can regularly, it is not necessary to multiple tasks regularly