Tasks are abstractions in .NET that provide units of asynchrony, just like promises in JavaScript. In initial versions of .NET, we had to rely on threads only, which were created either directly or using the ThreadPool class. The ThreadPool class provided a managed abstraction layer over threads but developers still relied on the Thread class for better control. By creating a thread via the Thread class, we gained access to the underlying object, which we can wait for, cancel, or move to the foreground or background. In real time, however, we required threads to perform work continuously. This required us to write lots of code, which was difficult to maintain. The Thread class was also unmanaged, which put a high burden on both the memory and the CPU. We needed the best of both worlds, which is where tasks come to the rescue. A task is nothing but a wrapper over a thread...
United States
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Hungary
Ukraine
Luxembourg
Estonia
Lithuania
South Korea
Turkey
Switzerland
Colombia
Taiwan
Chile
Norway
Ecuador
Indonesia
New Zealand
Cyprus
Denmark
Finland
Poland
Malta
Czechia
Austria
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Netherlands
Bulgaria
Latvia
South Africa
Malaysia
Japan
Slovakia
Philippines
Mexico
Thailand