stopping threads using interrupt() and catching interrupt in the mapBuffer and selector