Ryan aefbd57514 Add stack to promise.wait().
The problem was that if promise A was waiting and promise B was created and
then also told to wait (from some callback coming off the event loop), and
then promise A finished, promise B's wait would return. Promise A's wait
would not return until promise B was finished. This is incorrect.

To solve this issue properly, one probably needs to allocate separate
execution stacks. I use, instead, Poor Man's Coroutines. We continue to use
the main execution stack and force promises created most recently to return
first.

That is even if Promise A finishes first, neither wait() returns. Not until
Promise B finishes, will its wait() return. After that is complete, Promise
A's wait() will return.

This introduces the problem of growing the "wait stack" infinitely. Thus
I've added a strong warning to the documentation only to use this operation
sparingly. require() and include() seem to be the proper use case for such a
thing: they are called usually at program start up - they don't take too
long to finish and they won't be called so often.

Let's experiment with this stop-gap. If the infinite promise stack becomes a
problem for many, then I will remove promise.wait() entirely or perhaps only
use it for thread pool events.
2009-09-03 10:48:39 +02:00
2009-09-02 20:19:52 +02:00
2009-09-03 10:48:39 +02:00
2009-09-03 10:48:39 +02:00
2009-09-03 10:48:39 +02:00
2009-08-24 12:59:17 +02:00
2009-08-27 12:31:52 +02:00
2009-07-28 12:36:41 +02:00
2009-07-24 15:14:59 +02:00
2009-09-02 20:19:52 +02:00

Purely evented I/O for V8 javascript.

See http://tinyclouds.org/node for more information.

For help and discussion subscribe to the mailing list at 
http://groups.google.com/group/nodejs or send an email to 
nodejs+subscribe@googlegroups.com.

A list of projects using Node can be found at
http://wiki.github.com/ry/node

To build
./configure
make 
make install
Description
No description provided
Readme 175 MiB