fixes #187 non-blocking implementation of choice()