Commit Graph

12 Commits (4b5e6a38df2f68fd407ccfbdcb70960f6af6e0e2)

Author SHA1 Message Date
Forrest L Norvell 231092d236 doc: document domain.enter() and domain.exit()
Adds the documentation requested in #5017.
2013-08-05 13:11:38 +02:00
Michael Hart 440dcae987 Ensure BAD domain example actually uses domain 2013-04-01 10:09:27 -07:00
isaacs 5ae26f3750 doc: Add 'don't ignore errors' section to domain
Also, an example program of using cluster and domain to handle errors
safely, with zero downtime, using process isolation.
2013-03-28 09:53:59 -07:00
Paolo Fragomeni 8e2376b376 Update domain.markdown 2013-03-05 08:15:54 -08:00
isaacs ec8ebaf300 domain: use camelCase instead of snake_case
While it's true that error objects have a history of getting snake_case
properties attached by the host system, it's a point of confusion to
Node users that comes up a lot.  It's still 'experimental', so best to
change this sooner rather than later.
2012-12-29 10:37:31 -08:00
Andreas Madsen be5a8e24c2 doc: consistent use of the callback argument 2012-10-08 22:58:11 +02:00
Shigeki Ohtsu 5b37da2ac0 doc: fix domains example
Need `utf8` encoding for JSON.parse and fix to avoid JSON.parse error when only
one argument is passed in domain.bind
2012-07-30 19:15:46 +02:00
Ben Kelly c6185c8484 doc: Improve cross-linking in API docs markdown
Cross-link EventEmitter references in API docs to events.html

Fix broken cross-reference links with wrong anchor names in API docs.
2012-06-15 09:44:37 -07:00
Andreas Madsen 60b45dcbb6 domain: document and test dispose event 2012-06-09 18:15:38 +02:00
Marc Harter 569acea0ee Fix #3379 prevent domain.intercept passing 1st arg to cb 2012-06-08 23:32:13 -07:00
isaacs c0a9985da7 domain: Document explicit binding, and d.run() 2012-04-21 10:32:03 -07:00
isaacs 963459d736 Domain feature
This is a squashed commit of the main work done on the domains-wip branch.

The original commit messages are preserved for posterity:

* Implicitly add EventEmitters to active domain
* Implicitly add timers to active domain
* domain: add members, remove ctor cb
* Don't hijack bound callbacks for Domain error events
* Add dispose method
* Add domain.remove(ee) method
* A test of multiple domains in process at once
* Put the active domain on the process object
* Only intercept error arg if explicitly requested
* Typo
* Don't auto-add new domains to the current domain

    While an automatic parent/child relationship is sort of neat,
    and leads to some nice error-bubbling characteristics, it also
    results in keeping a reference to every EE and timer created,
    unless domains are explicitly disposed of.

* Explicitly adding one domain to another is still fine, of course.
* Don't allow circular domain->domain memberships
* Disposing of a domain removes it from its parent
* Domain disposal turns functions into no-ops
* More documentation of domains
* More thorough dispose() semantics
* An example using domains in an HTTP server
* Don't handle errors on a disposed domain
* Need to push, even if the same domain is entered multiple times
* Array.push is too slow for the EE Ctor
* lint domain
* domain: docs
* Also call abort and destroySoon to clean up event emitters
* domain: Wrap destroy methods in a try/catch
* Attach tick callbacks to active domain
* domain: Only implicitly bind timers, not explicitly
* domain: Don't fire timers when disposed.
* domain: Simplify naming so that MakeCallback works on Timers
* Add setInterval and nextTick to domain test
* domain: Make stack private
2012-04-17 13:14:55 -07:00