P
pplppp
Hi I'm new to C# and I am facing some simple scenario when
1) on the UI I press a button which triggers some calculation but I
dun want the user to wait
2) I update a dataset and I want to send the changes to another
endpoint
In both cases I believe I need to sprawn a new thread to preform the
work in the background, but C# offers many ways and I'm not sure what
are the differences between them and pros and cons of each. So far, I
think the following options are possible:
1) simple Threading, create an instance of ThreadStart and run it
2) use the ThreadPool and Queue a work item
3) call BeginInvoke of a Windows.Forms.Control object. or declare an
asynchronous delegate
Also C# has many Threading objects to do synchronization.. where can I
find a good tutorial explaning the differences between them and when
to use which one?
1) on the UI I press a button which triggers some calculation but I
dun want the user to wait
2) I update a dataset and I want to send the changes to another
endpoint
In both cases I believe I need to sprawn a new thread to preform the
work in the background, but C# offers many ways and I'm not sure what
are the differences between them and pros and cons of each. So far, I
think the following options are possible:
1) simple Threading, create an instance of ThreadStart and run it
2) use the ThreadPool and Queue a work item
3) call BeginInvoke of a Windows.Forms.Control object. or declare an
asynchronous delegate
Also C# has many Threading objects to do synchronization.. where can I
find a good tutorial explaning the differences between them and when
to use which one?