| 1076 | } |
| 1077 | |
| 1078 | void ComputeAsync(OpKernelContext* c, DoneCallback done) final { |
| 1079 | UnbatchResource* ubr; |
| 1080 | std::function<Status(UnbatchResource**)> creator = |
| 1081 | [this](UnbatchResource** r) { |
| 1082 | *r = new UnbatchResource(timeout_micros_); |
| 1083 | return Status::OK(); |
| 1084 | }; |
| 1085 | OP_REQUIRES_OK_ASYNC(c, |
| 1086 | c->resource_manager()->LookupOrCreate( |
| 1087 | container_, shared_name_, &ubr, creator), |
| 1088 | done); |
| 1089 | auto status = ubr->Compute(c, done); |
| 1090 | ubr->Unref(); |
| 1091 | OP_REQUIRES_OK_ASYNC(c, status, done); |
| 1092 | // Assume ubr calls done, so nothing to do here. |
| 1093 | } |
| 1094 | |
| 1095 | private: |
| 1096 | string container_; |
nothing calls this directly
no test coverage detected