Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion context.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,11 @@ module.exports = {
getNamespace : get,
createNamespace : create,
destroyNamespace : destroy,
reset : reset
reset : reset,
getSharedNamespace: function () {
if (!process.sharedNamespace) {
process.sharedNamespace = create('shared_' + Date.now() + '_' + Math.random());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of generating a random name and leaving things to chance, why not consider doing it right and implementing anonymous namespaces as I requested in #52?

}
return process.sharedNamespace;
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "continuation-local-storage",
"version": "3.1.4",
"version": "3.1.5",
"description": "userland implementation of https://github.com/joyent/node/issues/5243",
"main": "context.js",
"directories": {
Expand Down