In a supervisor, I use a config variable to determine what module to use in one of its worker specifications.<br><br>Is there a way to change a spec while an application/supervisor is already running? <br><br>It's easy enough to change the code of an already loaded module (just recompile), but how can I switch between using two different modules?<br>
<br>Specific example: <br>I have module for handling logins that I want my supervisor to be in charge of. Say that I've started the application and my config variable was "basicLoginHandler". Without bringing down the entire application, how can I later make the supervisor terminate its "basicLoginHandler" spec and start a new worker using a module called "advancedLoginHandler" that I've decided should be used instead?<br>