Feature Requests

Fredrik Linder fredrik.linder@REDACTED
Sat Nov 10 19:16:48 CET 2001


----- Original Message -----
From: "Sean Hinde" <Sean.Hinde@REDACTED>
To: "'Erlang Questions'" <erlang-questions@REDACTED>
Sent: Friday, November 09, 2001 4:59 PM
Subject: Feature Requests


> All,
>
> While we are dreaming here's a few thoughts on what I'd like to see: (A
bit
> early for Christmas I know but here goes anyway)

[...]

> STDLIB:
> Supervisors with option of delay between restarts

I would also like to add a wish to this list: deep sleep.

I am working in a project where we can have 10000+ instances of the same
type of process. However, all these processes are very scaresly used, and
keeping them as living processes would result in inefficient memory
utilization. To solve this, we stored its loopdata in a table, kill the
processes whenever it did not have any messages on its way (single access
point) and spawn it again when a new message was on its way.

A nice feature would be to have a (built in?) function that places a process
into a deep sleep, from which it is only woken by an incoming message or
signal. During this deep sleep should its RAM usage be turned into a
minimum, allowing other processes to use that memory.

Suggested interface:

erlang:deep_sleep(Pid) -> ok | exit()

I was about to implement this as an added feature for supervisors, but
realized that I had no control over signals nor usage of pids. Preventing
the kill & spawn strategy above.

/Fredrik





More information about the erlang-questions mailing list