PIDs an priority

Ulf Wiger <>
Tue Feb 28 00:50:36 CET 2006

Den 2006-02-27 23:16:15 skrev Eduardo Figoli (INS) <>:

> I have seen that ERTS makes priority to spawning processes rather than  
> processing the ones already spawned.How does this works in ERTS?

Spawn is an asynchronous operation. The spawned
process will be put in the scheduler queue while
the spawning process continues.

If you wanted to make the spawned process enter as
quickly as possible, you could do something
like this:

start_child() ->
   Pid = spawn_opt(
           fun() -> ... end,
           [{priority, high}, link]),

Ulf Wiger

More information about the erlang-questions mailing list