public static TaskContext currentFor(Thread thread){
  final Deque<TaskContext> stack;
synchronized (contextStacksMap) {
    stack=contextStacksMap.get(thread);
  }
  return (stack != null) ? stack.peek() : null;
}

public static TaskContext currentFor ( Thread thread ) { final Deque < TaskContext > stack ; synchronized ( contextStacksMap ) { stack = contextStacksMap . get ( thread ) ; } return ( stack != null ) ? stack . peek ( ) : null ; }
enables the application to peek into what is being executed in another thread . this method is intended for debugging and profiling .
