From 4bd05f39900bce0167916d90e3352667b586c279 Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Tue, 17 Apr 2018 13:34:05 +0200 Subject: Remove lib:send/2 and lib:sendw/2 --- lib/stdlib/doc/src/lib.xml | 24 ------------------------ lib/stdlib/src/lib.erl | 19 +------------------ 2 files changed, 1 insertion(+), 42 deletions(-) (limited to 'lib/stdlib') diff --git a/lib/stdlib/doc/src/lib.xml b/lib/stdlib/doc/src/lib.xml index 7aabb4bea8..e8c11ab816 100644 --- a/lib/stdlib/doc/src/lib.xml +++ b/lib/stdlib/doc/src/lib.xml @@ -65,30 +65,6 @@ - - - Send a message. - -

Makes it possible to send a message using the apply/3 BIF.

-
-
- - - - Send a message and wait for an answer. - -

As send/2, - but waits for an answer. It is implemented as follows:

- -sendw(To, Msg) -> - To ! {self(),Msg}, - receive - Reply -> Reply - end. -

The returned message is not necessarily a reply to the sent - message.

-
-
diff --git a/lib/stdlib/src/lib.erl b/lib/stdlib/src/lib.erl index 72ca7dab0a..cecb37ec36 100644 --- a/lib/stdlib/src/lib.erl +++ b/lib/stdlib/src/lib.erl @@ -19,8 +19,7 @@ %% -module(lib). --export([flush_receive/0, error_message/2, progname/0, send/2, - sendw/2, eval_str/1]). +-export([flush_receive/0, error_message/2, progname/0, eval_str/1]). -export([extended_parse_exprs/1, extended_parse_term/1, subst_values_for_vars/2]). @@ -62,22 +61,6 @@ progname() -> no_prog_name end. --spec send(To, Msg) -> Msg when - To :: pid() | atom() | {atom(), node()}, - Msg :: term(). - -send(To, Msg) -> To ! Msg. - --spec sendw(To, Msg) -> term() when - To :: pid() | atom() | {atom(), node()}, - Msg :: term(). - -sendw(To, Msg) -> - To ! {self(), Msg}, - receive - Reply -> Reply - end. - %% eval_str(InStr) -> {ok, OutStr} | {error, ErrStr'} %% InStr must represent a body %% Note: If InStr is a binary it has to be a Latin-1 string. -- cgit v1.2.3