Terminate an active javascript function/loop from another function
<p>I've got a javascript loop that triggers every time the page receives an update via websocket. This loop persists usually even after the next websocket update is received. The result is multiple loops begin running and page performance degrades rapidly. Each loop is critical though and only becomes obsolete until the next update.</p>

<p>Is there a way to terminate an active loop from another function or am I plainly just thinking about this the wrong way?</p>
