July 2015
Intermediate to advanced
1300 pages
87h 27m
English
So far, you have learned how to create and run new threads of execution to split big operations across multiple threads. This is useful, but there is a problem: Imagine that 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 thread synchronization. The idea is that, when a thread accesses a resource, this resource is locked until the required operations are completed to prevent other threads from accessing that resource. Visual Basic and the .NET Framework provide keywords and objects, respectively, to accomplish threads synchronization, as covered in the next subsections.