| 82 | } |
| 83 | |
| 84 | void Compute(OpKernelContext* c) override { |
| 85 | if (use_exclusive_lock_) { |
| 86 | // Hold mutex while we apply updates |
| 87 | mutex_lock l(*c->input_ref_mutex(0)); |
| 88 | DoCompute(c); |
| 89 | } else { |
| 90 | DoCompute(c); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | private: |
| 95 | bool use_exclusive_lock_; |
nothing calls this directly
no test coverage detected