exporting proc_lib:sync_wait/2

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Wed Nov 23 13:04:03 CET 2005


proc_lib:init_ack/2 is exported. Why not export
proc_lib:sync_wait/2?

The main reason for doing so would be that there
is no proc_lib:start_link(Fun).

There is a proc_lib:spawn_link(Fun), which can be
used, and start_link is just 

my_start_link(Fun) ->
   Pid = proc_lib:spawn_link(Fun),
   proc_lib:sync_wait(Pid, 10000).

and the only problem with that is that you
have to copy-paste sync_wait to your own
module in order to make it work.

/Uffe



More information about the erlang-questions mailing list