In GPU case, modified polling threads to waiting threads

This will reduce the CPU load significantly in OpenCL version, multithreaded mode