コード例 #1
0
ファイル: RhinoEngine.java プロジェクト: oberhamsi/ringojs
 /**
  * Get the worker associated with the given scope, or null.
  *
  * @return the worker associated with the current thread, or null.
  */
 public RingoWorker getCurrentWorker() {
   return currentWorker.get();
 }
コード例 #2
0
ファイル: RhinoEngine.java プロジェクト: oberhamsi/ringojs
 /**
  * Associate a worker with the current worker and return the worker that was previously associated
  * with it, or null.
  *
  * @param worker the new worker associated with the current thread
  * @return the worker previously associated with the current thread, or null
  */
 protected RingoWorker setCurrentWorker(RingoWorker worker) {
   RingoWorker previousWorker = currentWorker.get();
   currentWorker.set(worker);
   return previousWorker;
 }