Add perpetual thread and test.
(IntelliJ files).
Merge pull request #5 from gkopff/perpetual-thread

Perpetual thread