joyent/node — Issue #2738: uv_check_* behavior is inconsistent between the unix and windows implementations
Author: mojodna
Created: 2012-02-11 04:01:03+00:00
State: open

I have a module that registers `uv_check`s in order to track the state of a ØMQ socket. On Windows, it doesn't seem to run the check appropriately. This is with 0.6.10.

I've boiled it down to a simple case where output looks like:

Linux / OS X:

```bash
$ node unix.js
registering check
running check

running check
running check
unregistering check
```

Windows:

```bash
>node windows.js
registering check

running check
running check (sometimes)
unregistering check
```

On Windows, I would expect the initial check to occur "immediately" after being registered, as it is on *nix. There may also be refcount issues, as the ØMQ tests (https://github.com/mojodna/zeromq.node/tree/windows) return immediately, before `uv_check_stop()` is called.

More information and code: https://github.com/mojodna/uv_check_sample.node