Skip to content

Any chance you could update the README? #22

Open
sbowman opened this Issue Oct 28, 2012 · 0 comments

1 participant

@sbowman
sbowman commented Oct 28, 2012

Could you possibly go back and update the README so that the example code is complete and it works? Most of the code samples generate errors, and for the life of me I can't get the sample "echo" client to work quite right.

For example, this client-side code definitely doesn't work for echo:

  val node = Node("remote", "cookie")
  node.spawn { mbox =>
    mbox.send(('kharon, Symbol("kharon@hypatia")), mbox.self, (mbox.self, "Hello!"))
    val received = mbox.receive
    println("Received = " + received)
  }

The server-side gets the message and returns a response, but the client never gets it.

This revision to the above, however, does work:

  val node = Node("remote", "cookie")
  val mbox = node.spawnMbox
  mbox.send(('kharon, Symbol("kharon@hypatia")), mbox.self, (mbox.self, "Hello!"))
  val received = mbox.receive
  println("Received " + received)

But in both cases, the code hangs due to what I can only guess is a thread running in the background that isn't being cleaned up. I've tried this:

  node.shutdown
  println("Shutdown")

The "Shutdown" is output, but it doesn't really stop the node. Is there an example for how you stop a node just making a quick remote call for information?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.