I created a supervisor that spawned a gen_server I called timer_server. One of the tasks of this timer_server is to manage registration and call timer:send_interval to send a message to a pid on a certain interval.
However, in the init of the gen_server, where I call timer:send_interval I was getting a lockup. The documentation said the timer: functions return immediately, so this was very troubling.
When I renamed my gen_server to record_timer_server this problem cleared up. My question is two fold then:
- Why could I create a registered process
timer_server, if there already was one whentimer:start()was called by my application starting up? - Once started, why would this function not cause a badmatch finding the name, if it was calling in to my
timer_serverusing thesend_intervalfunction?
I don't think code is necessary but I can update to add some if requested.