Kentico scheduled Task - Multi Threading

Shailesh Kumar asked on March 30, 2017 09:13


I have a scheduled task that picks up records from database and performs some operation. But it locks the execution of task untill one operation is finished. Is it possible to run another scheduled task instance which picks up rest of the records and runs parallel to already running instance of the scheduled task.

Please suggest. I tried checking the box for "Run task in separate thread" assuming that it will run a parallel thread. Please reply ASAP.

Thanks, Shailesh

Recent Answers

Roman Hutnyk answered on March 30, 2017 14:24

Instead of running multiple instances of the same task I'd recommend running one task, but create separate thread for each data record.

1 votesVote for this answer Mark as a Correct answer

Shailesh Kumar answered on April 4, 2017 14:24

Thanks Roman for the reply, but I am running one task in two threads, through Kentico's option "run task in separate thread" and thread yielding, I could create only two threads that were functional at a time.

Have you tried running one task in multiple threads, if yes please elaborate and guide the approach.

Regards, Shailesh

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.