Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to Move more than 50 k Records from one DB to another DB for multiple Databases. I am using scheduler to call Background Worker

I am thinking to use background Worker Can any one tell me which is best process for this task?

What I have tried:

I am using scheduler to call Background Worker

I am thinking to use background Worker Can any one tell me which is best process for this task?
Posted
Updated 12-Apr-18 19:24pm
v2

1 solution

A background worker is good - but it's name suggests something that isn't true: it doesn't run at a lower priority than normal threads, it is a normal thread that will be automatically closed automatically when all foreground threads have exited (so your app doesn't have to worry about cleaning up threads behind it).

If you want to run a CPU intensive operation in the background, you would probably be better off using a regular Thread object, and setting the priority on that yourself: Thread.Priority Property (System.Threading)[^].
That will make you responsible for closing the thread if your app needs to exit, but that's probably a good idea anyway to ensure that you "know" that each operation is complete before your thread is automatically killed.
 
Share this answer
 
Comments
CPallini 12-Apr-18 5:47am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900