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
Slide 11
Slide 11 text
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
Slide 12
Slide 12 text
nio4r
https://github.com/socketry/nio4r
selector = NIO::Selector.new
loop do
selector.select do |monitor|
end
end
Concurrent
Slide 13
Slide 13 text
Crystal
https://crystal-lang.org/
ch = Channel(Int).new
spawn do
ch.send 42
end
value = ch.receive
Concurrent
Slide 14
Slide 14 text
Concurrent ? Pararell ?
Slide 15
Slide 15 text
Concurrent
竝列
Concurrent
Task
Task
Task
Slide 16
Slide 16 text
Pararell
竝⾏
Pararell
Task
Task
Task
Slide 17
Slide 17 text
Go is pararell.
Pararell
Slide 18
Slide 18 text
Go
https://golang.org/
ch := make(chan string)
go f(“some”, ch)
<- ch
Pararell