Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Cap. 20 – Exercícios: Nível #9 – 3
Play lesson

Aprenda Go 🇧🇷 - Cap. 20 – Exercícios: Nível #9 – 3

5.0 (2)
47 learners

What you'll learn

This course includes

  • 21.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Aprenda Go 🇧🇷 Cap. 20 – Exercícios: Nível #9 – 3

Cap. 20 – Exercícios: Nível #9 – 3 Transcript and Lesson Notes

- Utilizando goroutines, crie um programa incrementador: - Tenha uma variável com o valor da contagem - Crie um monte de goroutines, onde cada uma deve: - Ler o valor do contador - Salvar este valor - Fazer yield da thre

Quick Summary

- Utilizando goroutines, crie um programa incrementador: - Tenha uma variável com o valor da contagem - Crie um monte de goroutines, onde cada uma deve: - Ler o valor do contador - Salvar este valor - Fazer yield da thre

Key Takeaways

  • Review the core idea: - Utilizando goroutines, crie um programa incrementador: - Tenha uma variável com o valor da contagem - Crie um monte de goroutines, onde cada uma deve: - Ler o valor do contador - Salvar este valor - Fazer yield da thre
  • Understand how go fits into Cap. 20 – Exercícios: Nível #9 – 3.
  • Understand how golang fits into Cap. 20 – Exercícios: Nível #9 – 3.
  • Understand how programacao fits into Cap. 20 – Exercícios: Nível #9 – 3.
  • Understand how programar fits into Cap. 20 – Exercícios: Nível #9 – 3.

Key Concepts

Full Transcript

- Utilizando goroutines, crie um programa incrementador: - Tenha uma variável com o valor da contagem - Crie um monte de goroutines, onde cada uma deve: - Ler o valor do contador - Salvar este valor - Fazer yield da thread com runtime.Gosched() - Incrementar o valor salvo - Copiar o novo valor para a variável inicial - Utilize WaitGroups para que seu programa não finalize antes de suas goroutines. - Demonstre que há uma condição de corrida utilizando a flag -race - Solução: https://github.com/ellenkorbes/aprendago/blob/master/c%C3%B3digo/20_exercicios-ninja-9/03/main.go → Compartilhe sua solução e converse com outros estudantes em: https://github.com/ellenkorbes/aprendago/issues/61

Lesson FAQs

What is Cap. 20 – Exercícios: Nível #9 – 3 about?

- Utilizando goroutines, crie um programa incrementador: - Tenha uma variável com o valor da contagem - Crie um monte de goroutines, onde cada uma deve: - Ler o valor do contador - Salvar este valor - Fazer yield da thre

What key concepts are covered in this lesson?

The lesson covers go, golang, programacao, programar, programação.

What should I learn before Cap. 20 – Exercícios: Nível #9 – 3?

Review the previous lessons in Aprenda Go 🇧🇷, then use the transcript and key concepts on this page to fill any gaps.

How can I practice after this lesson?

Practice by applying the main concepts: go, golang, programacao, programar.

Does this lesson include a transcript?

Yes. The full transcript is visible on this page in indexable HTML sections.

Is this lesson free?

Yes. CourseHive lessons and courses are available to learn online for free.

Continue Learning

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Lessons

Related Courses

FAQs

Course Hive
Download CourseHive and keep learning anywhere
Get App