poll(2)-ing the stream Is it possible to wait for CUDA/io/whatever completion using poll(2)?


CUDA introduces asynchronous operations. That’s good and well, but how could we force CPU thread to wait on Unix file descriptors along with stream completion using poll(2) without busy waiting? That’s required for efficient service realization (i.e. reactor-based), but I cannot find an appropriate machinery to get the CUDA file descriptor from the CUDA context or the CUDA stream.