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...
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia