Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Golang Concurrency
Search
Alex Wheeler
November 16, 2017
0
87
Golang Concurrency
Alex Wheeler
November 16, 2017
Tweet
Share
More Decks by Alex Wheeler
See All by Alex Wheeler
Running Rings Around Rack
alexwheeler
0
83
Rewriting Rack: A Functional Approach
alexwheeler
2
120
Man Computer Symbiosis
alexwheeler
0
110
Flipper
alexwheeler
0
120
Transducers
alexwheeler
0
64
Character Encodings
alexwheeler
0
110
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
550
Thoughts on Productivity
jonyablonski
69
4.5k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
YesSQL, Process and Tooling at Scale
rocio
171
14k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
174
51k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Fireside Chat
paigeccino
34
3.2k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
The Invisible Side of Design
smashingmag
299
50k
Designing Experiences People Love
moore
139
23k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Optimizing for Happiness
mojombo
376
70k
Transcript
Golang The Future of VTS
• Yes, there will be Vim.
Background • Developed at Google • Born out of frustration
• 1. efficient compilation • 2. efficient execution • 3. ease of programming
Background • make programming fun again • feel of dynamic
language with type safety • run-time that supports GC, concurrency • lightweight flexible type system
Hello, World
Syntax
implicit typing
Concurrency
BUT FIRST… • Concurrency != Parallelism • Concurrency is about
dealing with lots of things at once. • Parallelism is about doing lots of things at once
goroutine • lightweight thread managed by the go runtime •
little memory (~2kb stack space), can spawn millions if you want • go f() starts function f in a new groutine
None
• “Don't communicate by sharing memory; share memory by communicating.”
- Golang • Communicating Sequential Processes - Tony Hoare
<- channels <- • typed structure through which you can
send/receive values using the channel operator • first class values • block by default
sending to channel
receiving from channel
Time for some code
None
None
Vim Support • https://github.com/fatih/vim-go
Further Learning • https://tour.golang.org • brew install go -- cross-compile-common
• #go-nuts on freenode • @askwheeler