bitwalker / swarm

Easy clustering, registration, and distribution of worker processes for Erlang/Elixir
MIT License
1.2k stars 103 forks source link

Allow other labels in sending to process #88

Open edescourtis opened 6 years ago

edescourtis commented 6 years ago

https://github.com/bitwalker/swarm/blob/7d2c2f4a97ce202b4ed111337c076ea275ec9ba2/lib/swarm/tracker/tracker.ex#L699

I am using a library which is intercepting GenServer.call and GenServer.cast below my module. Something fairly common in the OTP world. I need an option to tell Swarm to send calls using a specific label to get around this issue. See https://github.com/blackberry/Erlang-OTP/blob/3ec06ce97019eed9472a2cf8950ed23d7a2e6b9b/lib/stdlib/src/gen.erl#L146 . Can we please add this option when registering the process?

edescourtis commented 6 years ago

default can be :'$gen_call' https://github.com/blackberry/Erlang-OTP/blob/3ec06ce97019eed9472a2cf8950ed23d7a2e6b9b/lib/stdlib/src/gen_server.erl#L175

edescourtis commented 6 years ago

Another option would be to provide a call function reference (would be acceptable)