Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

new otp-receive function for mailboxes

  • Loading branch information...
commit 2cdcf8c2a6ae92987c8f05ff4f6bf6f6a7367abd 1 parent c807e75
Alvaro Videla authored

Showing 1 changed file with 8 additions and 4 deletions. Show diff stats Hide diff stats

  1. +8 4 src/closerl/core.clj
12 src/closerl/core.clj
@@ -62,6 +62,10 @@
62 62 [node-name]
63 63 (OtpNode. node-name))
64 64
  65 +(defn otp-ping
  66 + "Pings a remote Erlang node"
  67 + [node remote tmo]
  68 + (.ping node remote tmo))
65 69
66 70 (defn otp-mbox
67 71 "Creates an OtpMbox"
@@ -75,10 +79,10 @@
75 79 [mbox name]
76 80 (.registerName mbox name))
77 81
78   -(defn otp-ping
79   - "Pings a remote Erlang node"
80   - [node remote tmo]
81   - (.ping node remote tmo))
  82 +(defn otp-receive
  83 + "Receives a message. The process will block while waiting"
  84 + ([mbox] (.receive mbox))
  85 + ([mbox tmo] (.receive mbox tmo)))
82 86
83 87 ;; OtpSelf wrapper
84 88 (defn otp-self

0 comments on commit 2cdcf8c

Please sign in to comment.
Something went wrong with that request. Please try again.