Bert Belder
60746b03cb
windows: move some stream functions to stream-inl.h
2012-06-04 18:04:47 +02:00
Ben Noordhuis
d08070435d
test: rename test tcp_dont_connect_after_write
...
Rename test tcp_dont_connect_after_write to tcp_connect_error_after_write,
teensy tad more descriptive.
2012-06-04 17:35:56 +02:00
Ben Noordhuis
b96ed68f46
test: add TCP connect error + write test
...
Original test contributed by Iñaki Baz Castillo. See #443 .
2012-06-04 15:58:32 +02:00
Ben Noordhuis
c76c2066c6
unix, windows: add semaphore functions
2012-06-03 04:04:05 +02:00
Bert Belder
d8b95eaffb
windows: inline a couple of handle functions
2012-06-02 23:38:16 +02:00
Bert Belder
d402604118
windows: inline a couple of inline request functions
2012-06-02 23:08:22 +02:00
Bert Belder
9759c20e90
test: verify that closing an active poll handle doesn't hang
2012-06-01 18:39:47 +02:00
Ben Noordhuis
171ad8567d
unix, windows: add uv_walk()
...
Lets the libuv user iterate over the open handles. Mostly intended as a
debugging tool or a post-hoc cleanup mechanism.
2012-05-30 02:33:39 +02:00
Ben Noordhuis
28766dcf55
test: remove test-eio-overflow.c
...
Unreliable, it's timing / system load sensitive.
2012-05-25 01:33:44 +02:00
Ben Noordhuis
cff2221fbf
unix: split up loop.c
...
Move prepare/check/idle watcher code to loop-watcher.c so it can be reused for
the linux backend.
2012-05-23 23:47:06 +02:00
Ben Noordhuis
cd2a9b4d59
bench: measure ticks per second of idle event loop
2012-05-23 21:05:43 +02:00
Ben Noordhuis
7c8313bd0f
unix, windows: make uv_run_once() return a bool
...
The return value of uv_run_once() now signals if it needs to be called again.
Fixes #427 .
2012-05-23 20:49:03 +02:00
Bert Belder
c06edd4c88
windows, unix: share c-ares glue code
2012-05-22 16:11:22 +02:00
Ben Noordhuis
a478847f74
test: add callback order test
...
Ensure that idle callbacks run before other callbacks.
2012-05-22 16:04:11 +02:00
Ben Noordhuis
538a562cdb
test: add tcp connect timeout test
2012-05-18 01:19:56 +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
beaf750700
Test: add tests for uv_poll
2012-05-03 15:52:57 +02:00
Bert Belder
d60d94e0c3
Unix: implement uv_poll
2012-05-03 15:52:56 +02:00
Bert Belder
d7a71761c4
Windows: implement uv_poll
2012-05-03 15:52:52 +02:00
Ben Noordhuis
68bed698fc
unix: move loop init logic out of core.c
2012-04-04 05:54:39 -07:00
Ben Noordhuis
5a59e4924a
unix: move idle code from core.c to idle.c
2012-04-04 05:25:34 +02:00
Ben Noordhuis
dd31265751
unix: move check code from core.c to check.c
2012-04-04 05:25:34 +02:00
Ben Noordhuis
f1a19e6d34
unix: move prepare code from core.c to prepare.c
2012-04-04 05:25:34 +02:00
Ben Noordhuis
f7359a335c
unix: move async code from core.c to async.c
2012-04-04 05:25:34 +02:00
Ben Noordhuis
fd987a26fe
unix: move timer code from core.c to timer.c
2012-04-04 05:25:27 +02:00
Ben Noordhuis
c733cb807d
build: sort source files
2012-04-04 05:12:02 +02:00
Ben Noordhuis
396d1383fe
Merge branch 'v0.6'
2012-04-02 23:50:27 +02:00
Ben Noordhuis
9c8f6dd4f9
build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
...
Fixes a segmentation fault on some OS X systems due to sizeof(struct stat)
mismatches.
2012-04-02 23:49:53 +02:00
Ben Noordhuis
685b36ba66
linux: tidy up syscall code
2012-03-31 00:19:01 +00:00
saghul
e729a82e7d
build: don't link against the Carbon framework
...
Unused. The Makefile doesn't link against it either.
2012-03-26 00:13:55 +02:00
Ben Noordhuis
e190162975
test: test cross-process handle send/recv
2012-03-09 09:12:53 -08:00
Bert Belder
e99fba47c8
Merge remote-tracking branch 'origin/v0.6'
...
Conflicts:
src/win/pipe.c
test/run-tests.c
2012-03-09 16:41:12 +01:00
Bert Belder
422a898a7f
Tests: verify that shutdown_cb is always called
2012-03-09 05:00:11 +01:00
Ben Noordhuis
a93dc7ef11
build: link against libdl on linux
2012-03-05 15:36:27 +01:00
Shigeki Ohtsu
b55801f225
win, unix: add uv_dlerror() and uv_dlerror_free()
2012-03-02 16:39:21 +01:00
Ben Noordhuis
d3efefb043
linux: share inotify fd across event loop
...
Previously, a new inotify fd was created for each watcher, making it quite easy
to run into the system-wide fs.inotify.max_user_instances limit (usually 128).
Fixes #300 .
2012-02-23 09:21:30 -08:00
Ben Noordhuis
4e1f2b1f64
Merge remote-tracking branch 'origin/v0.6'
2012-02-12 16:10:05 +01:00
Ben Noordhuis
c5aa86bd39
Remove uv_import() and uv_export().
...
Not needed anymore now that support for isolates has been removed from Node.
This commit reverts the following commits:
812e410 test: fix up stream import/export test
e34dc13 unix: implement uv_import() and uv_export()
d1a0e8e test: fix undefined macro error
2ce0058 import/export streams accross loops
2012-02-12 15:49:54 +01:00
Roman Shtylman
9fa2cf2eac
test: add multicast TTL test
2012-02-06 15:02:39 +01:00
Ben Noordhuis
65bbf02dc5
build: bump _WIN32_WINNT to 0x600
...
Commit b471b33 updated the Makefile, this commit updates the gyp file.
2012-02-01 15:26:01 +01:00
isaacs
243cfcd078
Merge remote-tracking branch 'ry/v0.6'
2012-01-31 18:00:59 -08:00
Ben Noordhuis
cd16ba5186
test: add UDP broadcast/multicast/ttl tests
2012-01-31 16:52:27 +01:00
Igor Zinkovsky
2ce0058251
import/export streams accross loops
2012-01-30 21:44:27 +01:00
Shigeki Ohtsu
ba52023ef3
Fix missing increments of loop->counters
2011-12-12 18:01:26 +01:00
Igor Zinkovsky
dceb3e65ca
uv_cwd + uv_chdir
2011-12-01 12:27:12 -08:00
Ben Noordhuis
ec37d05d66
Revert "build: compile with -D__DARWIN_64_BIT_INO_T on OS X"
...
This reverts commit 01fbe7bf37 .
__DARWIN_64_BIT_INO_T is a no-op in most cases and might be actively harmful in
some others.
2011-12-01 21:02:29 +01:00
Ben Noordhuis
01fbe7bf37
build: compile with -D__DARWIN_64_BIT_INO_T on OS X
...
Fixes a struct stat size mismatch on 64 bits machines that made Node crash with
a EXC_BAD_ACCESS on startup.
Solution proposed by Paddy Byers.
2011-11-18 21:16:24 +01:00
Igor Zinkovsky
f1859eb841
windows: convert WSAECONNABORTED to EOF
2011-11-07 16:53:27 -08:00
Ryan Dahl
0698e3f905
Fix UNIX pipe connect error reporting, add test
2011-11-03 15:47:43 -07:00
Bert Belder
90e15f1110
Implement uv_dlopen and friends
2011-10-29 00:52:34 +02:00