gen_event:start_link().

{enter,into,a,scalable,world}.

Just for Fun: Wanna Load Your Computer ?

Don’t forget to start the Erlang runtime system with a maximum number of concurrent processes sufficiently high, eg. erl +P 100000000.

Of course, be sure it will finish to crash …

smp_load.erl link
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
%% 1> c(smp_load).
%% 2> smp_load:start().

-module(smp_load).
-export([start/0]).

fx(X, 1) ->
    X;
fx(X, Y) ->
    _ = X bxor Y,
    fx(X*Y, Y-1).

start() ->
    spawn(fun() -> fx(16#FF, 16#FFFF) end),
    start().