Threads Synchronization

Until now you saw how to create and rung new threads of execution to split big operations across multiple threads. This is useful but there is a problem: Imagine you have multiple threads accessing the same data source simultaneously; what happens to the data source and how are threads handled to avoid errors? This is a problem that is solved with the so-called thread synchronization. Basically the idea is that when a thread accesses a resource, this resource is locked until required operations are completed to prevent other threads from accessing that resource. Both Visual Basic and the .NET Framework respectively provide keywords and objects to accomplish threads synchronization, as covered in the next subsections.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.193.244