spawn_sync/3 is an Erlang function exported by "age_system" module.
This function works similarly to wait/4, however, it is not a blocking function. It starts waiting for active processes asynchronously in a dedicated anonymous process linked to the caller.
You can use this function when you don't care about synchronization with the current code, but you want to be sure that the SyncFun shall be executed when all listed Processes are active.
For example, let's take a look on the code sample below - this will invoke asynchronously an anonymous function to print-out "All AGE node processes are initialized..." when all node processes are active.
|