Commit Graph

15 Commits

Author SHA1 Message Date
Bert Belder
d402604118 windows: inline a couple of inline request functions 2012-06-02 23:08:22 +02:00
Bert Belder
c06edd4c88 windows, unix: share c-ares glue code 2012-05-22 16:11:22 +02:00
Ben Noordhuis
9efa8b3571 unix, windows: rework reference counting scheme
This commit changes how the event loop determines if it needs to stay alive.

Previously, an internal counter was increased whenever a handle got created
and decreased again when the handle was closed.

While conceptually simple, it turned out hard to work with: you often want
to keep the event loop alive only if the handle is actually doing something.
Stopped or inactive handles were a frequent source of hanging event loops.

That's why this commit changes the reference counting scheme to a model where
a handle only references the event loop when it's active. 'Active' means
different things for different handle types, e.g.:

 * timers: ticking
 * sockets: reading, writing or listening
 * processes: always active (for now, subject to change)
 * idle, check, prepare: only active when started

This commit also changes how the uv_ref() and uv_unref() functions work: they
now operate on the level of individual handles, not the whole event loop.

The Windows implementation was done by Bert Belder.
2012-05-17 07:07:53 +02:00
Bert Belder
d7a71761c4 Windows: implement uv_poll 2012-05-03 15:52:52 +02:00
Bert Belder
fce90652ed Windows: avoid the loop starvation bug. Closes GH-154 2011-11-28 19:36:41 +01:00
Bert Belder
622eb99113 win: implement tty
loose end: line-buffered input reads ascii, not unicode
2011-09-26 19:31:32 +02:00
Igor Zinkovsky
1e0757ffda windows: file watcher 2011-09-21 13:13:34 -07:00
Bert Belder
78debf9f67 win: multiplicity 2011-08-31 04:19:16 +02:00
Igor Zinkovsky
25175c7071 uv_fs & uv_work APIs 2011-08-26 11:00:53 -07:00
Bert Belder
5c9d749a57 win: udp support 2011-08-24 04:55:08 +02:00
Bert Belder
5cae6e4e57 win: use uv_req_t.overlapped.Internal field to propagate request errors 2011-08-23 21:24:14 +02:00
Jeroen Janssen
6b27bf9a86 uv_process_pipe_shutdown_req call should match prototype 2011-08-17 13:58:56 +02:00
Bert Belder
ca633920f5 Windows: fix pipe shutdown 2011-08-11 04:18:29 +02:00
Igor Zinkovsky
d272a2183d Windows: spawn child processes 2011-07-29 19:02:51 -07:00
Bert Belder
3a91232f66 Split up uv-win.c 2011-07-19 03:47:30 +02:00