1
我注意到了tests中的那些函數。 有沒有關於它的任何文檔?mongo shell中的Thread和ScopedThread函數
如何通過mongo shell使用線程? 我可以在線程中共享遊標嗎? 如果我在線程中共享變量,是否需要鎖定變量?
這裏是複製粘貼的github上:
Thread = function(){
this.init.apply(this, arguments);
}
_threadInject(Thread.prototype);
ScopedThread = function() {
this.init.apply(this, arguments);
}
ScopedThread.prototype = new Thread(function() {});
_scopedThreadInject(ScopedThread.prototype);