History log of /libuv/test/test-ref.c (Results 26 – 34 of 34)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: node-v0.7.10, node-v0.6.19, node-v0.7.9
# 9efa8b35 17-May-2012 Ben Noordhuis

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

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.

show more ...

Revision tags: node-v0.6.18, node-v0.6.16, node-v0.6.17, node-v0.7.8, node-v0.6.15, node-v0.6.14, node-v0.6.13, node-v0.7.6
# 8c78cb40 09-Mar-2012 Ben Noordhuis

unix: replace C99/C++ comments, fix build

# fb65d74c 09-Mar-2012 Bert Belder

Tests: verify that uv_write and uv_shutdown ref the event loop

Revision tags: node-v0.6.12, node-v0.6.11, node-v0.7.4, node-v0.6.10, node-v0.7.2, node-v0.6.9, node-v0.7.1
# ac218a7e 13-Jan-2012 Ben Noordhuis

test: add lots of refcount tests

Revision tags: node-v0.7.0, node-v0.6.8, node-v0.6.7, node-v0.6.6, node-v0.6.4, node-v0.6.3, node-v0.6.2, node-v0.6.1, node-v0.6.0, node-v0.5.10, node-v0.5.9, node-v0.5.8, node-v0.5.7, node-v0.5.6
# 0dc564a2 08-Sep-2011 Bert Belder

Remove uv_init calls from tests and benchmarks

# 3aec77f9 31-Aug-2011 Bert Belder

bring back uv_init

# 56dcaf9b 31-Aug-2011 Ryan Dahl

unix: multiplicity

Revision tags: node-v0.5.5, node-v0.5.4, node-v0.5.2
# 1ab28df4 21-Jul-2011 Bert Belder

Test that loop refs going down to zero in a prepare callback does not hang the event loop

# 9d8c9cce 21-Jul-2011 Bert Belder

Move loop reference tests to their own file

12