Skip to content
Open
Changes from 1 commit
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;
}
};