Created
May 1, 2014 17:42
-
-
Save schmurfy/b3624c6e17909ca9228d to your computer and use it in GitHub Desktop.
conccurent-ruby sandbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Processor | |
include Concurrent::ActorContext | |
def receive(msg) | |
# do something with the message(s) | |
<mystery>.post(msg) | |
end | |
end | |
class DatabaseOutput | |
include Concurrent::ActorContext | |
def receive(msg) | |
# save it to the database | |
end | |
end | |
class ZeromqOutput | |
include Concurrent::ActorContext | |
end | |
processor = Processor.spawn() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment