Module memo

The memo module is a high-level Erlang module, providing a simple possibility for a process to memorize some values, without having to keep them as a function parameter.

Authors: Sten Gruener.

Description

The memo module is a high-level Erlang module, providing a simple possibility for a process to memorize some values, without having to keep them as a function parameter. No dictionary is used, instead the use of message queue is made.

Function Index

read/1Reads a memo trying to pattern-match the identifier, non-blocking.
save/2Saves a memo.

Function Details

read/1

read(Identifier::string()) -> any() | {error, atom()}

Reads a memo trying to pattern-match the identifier, non-blocking. Note: if there multiple memos with same identifier the FIFO approach will be used. Returns {error, no_memo} if no memo matched

save/2

save(Identifier::string(), Message::any()) -> ok | {error, atom()}

Saves a memo. Note: the identifier is expected to be a String and may not be unique


Generated by EDoc, Aug 13 2009, 23:20:23.