I am running a while loop which ends in & and I closed the terminal, so I can't stop it now
Open a new Terminal tab/window
Run ps alx|grep "[s]leep 1" (maybe several times, until you get the sleep 1 as part of the output

pse@Mithos:~$ ps alx|grep sleep 1
  502  1268  1245   0  20  0  2432796   1460 -      S      ??    0:00.00 sleep 31536000
  502 80121   809   0  31  0  2432796   1772 -      S+   s002    0:00.00 sleep 1

Kill the shell it's running in by using the parent PID of the sleep command (the number in the third column, 809 in this case): kill -HUP YOUR-PARENT-PID-HERE