اشتراکها
اشتراکها
سوالات مصاحبه ای در مورد #C و دات نت
اشتراکها
مقدمه ای بر برنامه نویسی همزمان
What is concurrent programing? Simply described, it’s when you are doing more than one thing at the same time. Not to be confused with parallelism, concurrency is when multiple sequences of operations are run in overlapping periods of time. In the realm of programming, concurrency is a pretty complex subject. Dealing with constructs such as threads and locks and avoiding issues like race conditions and deadlocks can be quite cumbersome, making concurrent programs difficult to write. Through concurrency, programs can be designed as independent processes working together in a specific composition. Such a structure may or may not be made parallel; however, achieving such a structure in your program offers numerous advantages.
اشتراکها
طراحی جدید سایت TypeScript
اشتراکها
10فریم ورک برتر توسعه وب در سال 2017
:When to use Async/Await
There are basically two scenarios where Async/Await is the right solution
I/O-bound work: Your code will be waiting for something, such as data from a database, reading a file, a call to a web service. In this case you should use Async/Await, but not use the .Task Parallel Library
CPU-bound work: Your code will be performing a complex computation. In this case, you should use Async/Await but spawn the work off on another thread using Task.Run. You may .also consider using the Task Parallel Library