Skip to content

Instantly share code, notes, and snippets.

@schmurfy
Created May 1, 2014 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schmurfy/b3624c6e17909ca9228d to your computer and use it in GitHub Desktop.
Save schmurfy/b3624c6e17909ca9228d to your computer and use it in GitHub Desktop.
conccurent-ruby sandbox
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