Anuncios


How to boost program performance with multithreading and concurrency techniques

I think that most of us programmers start developing applications in single threaded mode. Which means that tasks or actions defined in this application will be executed in a certain predefined sequence. But at some point, we need to start tasks simultaneously and to be completed asynchronously in order to save execution time and to boost up performance.

Here is an example. You need to compare the execution speed of two tasks. In a single threaded program you have to perform the speed measurement tasks one after another, then compare the time difference at the end of when both tasks are done. Let’s say Task A needs 30 seconds and Task B needs only 0.5 second. Therefore, if you start Task B after Task A, you won’t see Task B to be completed until Task A is finished.

If we do it in a multithreaded mode, then no matter which task first, we can always see Task B to be finished in 0.5 second while Task A is still running. And if we use the right multi-threading technique, Task A might not even need 30 seconds to run. This is the beauty of multi-threading programming.

For the time being, there are several multi-threading techniques available in C# and .Net. Including Thread, ThreadPool, Task, TaskFactory, Task Run, BackgroundWorker, async and await, Parallel.For/Parallel.ForEach… Wow! So overwhelming!

Don’t worry, this two-hour long free course provides you a very good insight on when to use what. Topics that will be mainly covered including the followings:

  • Problems with single threaded application

  • Basics of mult-threading model of C#

  • The BackgroundWorker

  • Use Dispatcher to update UI in progress

  • Thread and ThreadPool

  • TPL (1) – Task. Run and Task. Factory

  • TPL (2) – async and await

  • TPL (3) – Parallel programming

And the sample being used in this course is quite interesting as well. We are going to compare the speed of concatenating a string 50,000 times by using a string type variable and a StringBuilder type variable, respectively. You will be surprised at the performance that they yield.

Even though this course just brings you the basic concept of .Net’s multithreading techniques, the codes introduced in this course should be useful enough in your real world projects. Hope you enjoy this course.

Conceptos básicos de subprocesos múltiples de C#

How to boost program performance with multithreading and concurrency techniques”

Este curso es GRATIS

¿Quieres más cursos gratis?

Únete a nuestro canal en Telegram con cientos de cursos gratis publicados diariamente

Curso gratis en Udemy

Con los cursos gratis de Udemy puedes aprender muchas cosas sin tener que gastar en ello. Pero primero debes tener en cuenta varias cosas:

Anuncios

Contenido Gratuito

Los cursos gratis de Udemy te permiten aprender nuevas cosas sin tener que pagar. Aprovecha la oportunidad.

Aprendizaje

Pon en práctica todos tus conocimientos aprendidos. Realiza increíbles proyectos basados en el mundo real.

Limites

Debes tener en cuenta que todos los cursos gratuitos de Udemy son de máximo 2 horas y no incluyen un certificado.

Este curso se encuentra disponible de manera gratuita sin necesidad de ningún cupón, a través de la opción “GRATIS”.

Te recomendamos primero leer las diferencias entre un curso gratis y uno de pago para evitar malentendidos:

Cursos gratuitos
  • Contenido de vídeo en línea
Cursos de pago
  • Contenido de vídeo en línea
  • Certificado de finalización
  • Preguntas y respuestas de los instructores
  • Mensaje directo para el instructor

Aunque los cursos son colocados de manera gratuita, es posible que el autor del curso pueda cambiarlos a modalidad de pago, por lo cual te recomendamos revisar muy bien las características del curso.

Para obtener el curso de manera gratuita usa el siguiente botón:


Deja tus comentarios y sugerencias


Sobre Facialix

Facialix es un sitio web que tiene como objetivo apoyar en el aprendizaje y educación de jóvenes y grandes. Buscando y categorizando recursos educativos gratuitos de internet, de esta manera Facialix ayuda en el constante aprendizaje de todos.