◐ Shell
clean mode source ↗

Message 344716 - Python tracker

> Would it be possible to make FD_SETSIZE configurable at runtime, at least on Windows? IMHO it would be a better approach.

That would be awesome, but it doesn't look like it would be possible. As I have already pointed out in my previous comment:

> I'm not sure this can be totally dynamic on Windows. The problem is the fd_set struct which is defined in Winsock2.h
>
> typedef struct fd_set {
>         u_int fd_count;               /* how many are SET? */
>         SOCKET  fd_array[FD_SETSIZE];   /* an array of SOCKETs */
> } fd_set;
>
> The heap-allocated pylists are converted into fd_set structs which are always allocated on the stack btw. The problem is there's no way to create a fd_set of a desired FD_SETSIZE at runtime.