Example of threading with a serial listener and dispatcher