unix/moduselect: If file object passed to .register(), return it in .poll().
This makes unix "uselect" compatible with baremetal "uselect". Previosuly, unix version accepted file/socket objects, but internally converted that to file descriptors, and that's what .poll() returned. To acheive new behavior, file-like objects are stored internally in an array, in addition to existing array of struct pollfd. This array is created only on first case of file-like object being passed to .register(). If only raw fd's are passed, there will be no additional memory used comparing to the original implementation.
Showing
Please register or sign in to comment