Browse files

new otp-receive function for mailboxes

  • Loading branch information...
1 parent c807e75 commit 2cdcf8c2a6ae92987c8f05ff4f6bf6f6a7367abd @videlalvaro committed Aug 15, 2010
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/closerl/core.clj
View
12 src/closerl/core.clj
@@ -62,6 +62,10 @@
[node-name]
(OtpNode. node-name))
+(defn otp-ping
+ "Pings a remote Erlang node"
+ [node remote tmo]
+ (.ping node remote tmo))
(defn otp-mbox
"Creates an OtpMbox"
@@ -75,10 +79,10 @@
[mbox name]
(.registerName mbox name))
-(defn otp-ping
- "Pings a remote Erlang node"
- [node remote tmo]
- (.ping node remote tmo))
+(defn otp-receive
+ "Receives a message. The process will block while waiting"
+ ([mbox] (.receive mbox))
+ ([mbox tmo] (.receive mbox tmo)))
;; OtpSelf wrapper
(defn otp-self

0 comments on commit 2cdcf8c

Please sign in to comment.