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
竝行
Search
さっちゃん
September 14, 2017
Programming
240
0
Share
竝行
Rubyと竝行
concurrent/pararell
さっちゃん
September 14, 2017
More Decks by さっちゃん
See All by さっちゃん
火星曆
ne_sachirou
0
16
みんなのオブザーバビリティプラットフォームを作ってるんだがパフォーマンスがやばい #mackerelio #srenext
ne_sachirou
0
1.7k
作ってよかったgraceful shutdownライブラリ #kyotogo
ne_sachirou
0
1.4k
path 依存型って何?
ne_sachirou
0
810
野生の onbording と onbording 設計 #kyototechtalk
ne_sachirou
0
710
メトリックはいかにして見え續ける樣になったか #devio2022
ne_sachirou
0
120
名實一致
ne_sachirou
0
730
まかれるあなとみあ ―Mackerel のしくみを理解する 30 分― @ Hatena Engineer Seminar #16
ne_sachirou
0
3.3k
tacit programming : Point-free, Concatenatives & J
ne_sachirou
0
1.1k
Other Decks in Programming
See All in Programming
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
130
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
130
Explore CoroutineScope
tomoeng11
0
160
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
450
[RubyKaigi 2026] Require Hooks
palkan
1
280
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
320
Making the RBS Parser Faster
soutaro
0
660
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
190
The Less-Told Story of Socket Timeouts
coe401_
3
940
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
160
GoogleCloudとterraform完全に理解した
terisuke
1
180
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
27
19k
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
770
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
900
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
380
Believing is Seeing
oripsolob
1
120
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
160
Thoughts on Productivity
jonyablonski
76
5.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Visualization
eitanlees
150
17k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Designing Experiences People Love
moore
143
24k
Transcript
竝⾏ Pararell
.。oO(さっちゃんですよヾ(〃l _ l)ノ゙☆)
https://hex.pm/packages/holiday_jp https://hex.pm/packages/pqueue2 https://hex.pm/packages/stream_gzip https://hex.pm/packages/stream_hash
竝⾏ Pararell
Node.js is concurrent. Crystal is concurrent. Concurrent
Node.js is concurrent. Crystal is concurrent. Also Ruby is concurrent.
Concurrent
Thread thread1 = Thread.new { } thread2 = Thread.new {
} [thread1, thread2].each &:join Concurrent
Concurrent Ruby https://github.com/ruby-concurrency/concurrent-ruby future = Concurrent::Future.execute { } while future.pending?
sleep 0.1 end future.value Concurrent
Concurrent Ruby https://github.com/ruby-concurrency/concurrent-ruby Concurrent::Promise.execute { }.then { } Concurrent
Concurrent Ruby https://github.com/ruby-concurrency/concurrent-ruby class Echo include Concurrent::Async def echo(msg) print
"#{msg}\n” end End horn = Echo.new horn.async.echo 'oneʼ horn.await.echo 'two' Concurrent
EventMachine https://github.com/eventmachine/eventmachine/ EM::run do client = MyApp.new give_tick = proc
do Gtk::main_iteration_do false EM.next_tick give_tick end give_tick.call end Concurrent
nio4r https://github.com/socketry/nio4r selector = NIO::Selector.new loop do selector.select do |monitor|
end end Concurrent
Crystal https://crystal-lang.org/ ch = Channel(Int).new spawn do ch.send 42 end
value = ch.receive Concurrent
Concurrent ? Pararell ?
Concurrent 竝列 Concurrent Task Task Task
Pararell 竝⾏ Pararell Task Task Task
Go is pararell. Pararell
Go https://golang.org/ ch := make(chan string) go f(“some”, ch) <-
ch Pararell
Go is pararell. Pararell
Go is pararell. Ruby is _ Pararell
pararell https://github.com/grosser/parallel Pararell.map([]) { } Pararell.each([]) { } Pararell.any?([]) {
} Pararell.all?([]) { } Pararell
pararell Inside pararell: Pararell
pararell Inside pararell: Process.fork { } Pararell
pararell Inside pararell: Process.fork { } Pararell
Use Elixir Pararell
Use Elixir Pararell Pararell
Use Elixir Pararell Fault tolerant Pararell
Use Elixir Pararell Fault tolerant Soft realtime Pararell