Removes a reference from the scope's reference counter. # Safety The caller must be able to point to a corresponding place where the scope counter was incremented by one. This could be through a call to `add_reference`, a direct `fetch_add` on the underlying counter, or the implicit initial increment the scope starts with.
(&self)
| 312 | // while a job might still use (or drop) them. |
| 313 | // |
| 314 | // * If `op` is `!Send` then `JobRef::execute` will only be called |
| 315 | // on this thread. |
| 316 | // |
| 317 | // `op` is unconditionally `Send`: `F: Send + Sync` makes |
| 318 | // `Arc<F>: Send`, and `Scope: Sync` makes `&Scope: Send`. |
| 319 | let job_ref = unsafe { job.into_job_ref() }; |
| 320 | member_data.broadcasts[member_index].push(job_ref); |
| 321 | member_data.semaphores[member_index].signal(); |
| 322 | } |
| 323 | |
| 324 | // Once we have finished pushing jobs out to workers who we know are not |
| 325 | // in the middle of resginging, we can allow resignations again. |
| 326 | self.thread_pool.unfreeze_membership(); |
| 327 | } |
| 328 | |
| 329 | /// Adds an additional reference to the scope's reference counter. |
| 330 | /// |
| 331 | /// Every call to this should have a matching call to |
| 332 | /// `Scope::remove_reference`, or the scope will block forever on |
| 333 | /// completion. |
no outgoing calls
no test coverage detected