Skip to content

Instantly share code, notes, and snippets.

@AeroNotix
Created March 1, 2016 13:14
Show Gist options
  • Save AeroNotix/eaad66f121aaa199ca6e to your computer and use it in GitHub Desktop.
Save AeroNotix/eaad66f121aaa199ca6e to your computer and use it in GitHub Desktop.
application:ensure_all_started(cpg).
F = fun() ->
receive
ok ->
ok
end
end.
Pids = [spawn(F) || _ <- lists:seq(1,50000)].
[cpg:join(cpg_default_scope, "/foo", P) || P <- Pids].
[exit(P, kill) || P <- Pids].
sys:get_state(cpg_default_scope). %% any operation on cpg's default scope
@ostinelli
Copy link

@AeroNotix I take it you're referring to the process_exit_callback callbacks? If so, I've never seen them pile up. This really depends on what you do with them, I just log the process exiting.

I've been asked by various developers if Syn could be used to manage Process Groups. It actually isn't very complicated to add this functionality so I did :) It's currently in a branch: https://github.com/ostinelli/syn/tree/pg. Please take a look at it and let me know.

I'd love to see any tests run on Syn. I never run the Jepsen tests and I'm not familiar enough to know if it is ok with eventual consistency. If you feel like giving it a go please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment