rubinius/rubinius — Issue #1600: Eventmachine Support on Windows
Author: stakach
Created: 2012-03-08 03:22:25+00:00
State: open

Hi,

Just wanted to make everyone aware of some of the issues that may crop up around Rubinius support for Windows.
I very much look forward to the Rubinius 2.0 release and thought you may be interested in a recent issue we've been working through on RubyInstaller version of Ruby.

You can see the full discussion here: oneclick/rubyinstaller#104
The eventmachine pull request here: eventmachine/eventmachine#303

Basically it amounts to how Windows deals with socket and file limits and that these limits are defined at compile time (at least for sockets) and any c plugins that use these libraries need to define the same limit to avoid weird and wonderful issues.

Currently it's been decided that the limit should be 32767 sockets, roughly equating to the maximum open sockets possible on a Windows machine.

`#define FD_SETSIZE 32767`
before
`#include `

Also there is a limit on maximum file descriptors (which are different to socket descriptors on Windows) that is set to 512
This can be increased to using `_setmaxstdio(2048);` after including `#include ` the global maximum is 2048.

If everyone sets the same values when it comes to Windows then it'll be much easier to develop and use plugins without having to worry too much about the ruby implementation.