| 277 | } |
| 278 | |
| 279 | void StarWorker::Cleanup(int64 step_id) { |
| 280 | if (env()->lockless) { |
| 281 | if (--pending_graph_count_[step_id] == 0) { |
| 282 | pending_graph_count_.erase(step_id); |
| 283 | env()->rendezvous_mgr->Cleanup(step_id); |
| 284 | } |
| 285 | return; |
| 286 | } |
| 287 | |
| 288 | int left = -1; |
| 289 | { |
| 290 | mutex_lock l(graph_count_mu_); |
| 291 | left = --pending_graph_count_[step_id]; |
| 292 | if (left == 0) { |
| 293 | pending_graph_count_.erase(step_id); |
| 294 | } |
| 295 | } |
| 296 | if (left == 0) { |
| 297 | env()->rendezvous_mgr->Cleanup(step_id); |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | void StarWorker::StarRunGraphAsync(StarRunGraphRequest* request, |
| 302 | StarRunGraphResponse* response, |
no test coverage detected