Skip to content

Instantly share code, notes, and snippets.

@debasishg
Created April 18, 2010 05:51
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 debasishg/370032 to your computer and use it in GitHub Desktop.
Save debasishg/370032 to your computer and use it in GitHub Desktop.
1. Go back to the first shell
2. Sub.unsub("a") // should unsubscribe the first shell from channel "a"
3. Study the callback function defined below. It supports many other message formats.
4. In the second shell window do the following:
scala> Pub.publish("b", "+c") // will subscribe the first window to channel "c"
scala> Pub.publish("b", "+d") // will subscribe the first window to channel "d"
scala> Pub.publish("b", "-c") // will unsubscribe the first window from channel "c"
scala> Pub.publish("b", "exit") // will unsubscribe the first window from all channels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment