add green.locking for critical sections