If the animal is allowed to survive after spinning its cocoon, it will make a hole in the cocoon when it exits as a moth. This would cut the threads and ruin the silk. Instead, silkworm cocoons are thrown into boiling water, which kills the silkworms and also makes the cocoons easier to unravel. Often, the silkworm itself is eaten.