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 | member_data.semaphores[member_index].signal(); |
| 313 | } |
| 314 | |
| 315 | // Once we have finished pushing jobs out to workers who we know are not |
| 316 | // in the middle of resginging, we can allow resignations again. |
| 317 | self.thread_pool.unfreeze_membership(); |
| 318 | } |
| 319 | |
| 320 | /// Adds an additional reference to the scope's reference counter. |
| 321 | /// |
| 322 | /// Every call to this should have a matching call to |
| 323 | /// `Scope::remove_reference`, or the scope will block forever on |
| 324 | /// completion. |
| 325 | fn add_reference(&self) { |
| 326 | self.count.fetch_add(1, Ordering::Relaxed); |
| 327 | } |
| 328 | |
| 329 | /// Removes a reference from the scope's reference counter. |
| 330 | /// |
| 331 | /// # Safety |
| 332 | /// |
| 333 | /// The caller must be able to point to a corresponding place where the scope |
no outgoing calls
no test coverage detected