<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/sync, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-07-16T03:07:03+00:00</updated>
<entry>
<title>Update poison.rs</title>
<updated>2025-07-16T03:07:03+00:00</updated>
<author>
<name>Martin Ombura Jr.</name>
<email>8682597+martinomburajr@users.noreply.github.com</email>
</author>
<published>2025-07-16T03:07:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f1d84468c87a4e8ea96e603d21c460004bdeb24f'/>
<id>urn:sha1:f1d84468c87a4e8ea96e603d21c460004bdeb24f</id>
<content type='text'>
Typo in word "below"</content>
</entry>
<entry>
<title>Rollup merge of #143340 - nabijaczleweli:awhile, r=mati865</title>
<updated>2025-07-07T17:55:32+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-07-07T17:55:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2554c424ef0505d0e08d56be8630e6c4045a88c8'/>
<id>urn:sha1:2554c424ef0505d0e08d56be8630e6c4045a88c8</id>
<content type='text'>
awhile -&gt; a while where appropriate
</content>
</entry>
<entry>
<title>Rollup merge of #143086 - SciMind2460:patch-2, r=workingjubilee</title>
<updated>2025-07-05T06:26:20+00:00</updated>
<author>
<name>Jubilee</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2025-07-05T06:26:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2f119daf4eb26fe73d8e5e651769977484f67328'/>
<id>urn:sha1:2f119daf4eb26fe73d8e5e651769977484f67328</id>
<content type='text'>
Update poison.rs to fix the typo (sys-&gt;sync)
</content>
</entry>
<entry>
<title>awhile -&gt; a while where appropriate</title>
<updated>2025-07-02T18:17:29+00:00</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2025-07-01T05:21:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a0111ec7a1f895bd4517b8530596d408f1b58214'/>
<id>urn:sha1:a0111ec7a1f895bd4517b8530596d408f1b58214</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update version placeholders</title>
<updated>2025-07-01T17:54:33+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2025-06-23T17:24:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9ce8930da62a9be15831b78b9834d91702872e15'/>
<id>urn:sha1:9ce8930da62a9be15831b78b9834d91702872e15</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update poison.rs to fix the typo (sys-&gt;sync)</title>
<updated>2025-06-27T10:56:53+00:00</updated>
<author>
<name>Kurt Heiritz (pseudo)</name>
<email>saarthkarkera@gmail.com</email>
</author>
<published>2025-06-27T10:56:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=06fb36c92ea0d92d93361badde0cae5aab763d43'/>
<id>urn:sha1:06fb36c92ea0d92d93361badde0cae5aab763d43</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix RwLock::try_write documentation for WouldBlock condition</title>
<updated>2025-06-26T10:03:43+00:00</updated>
<author>
<name>krikera</name>
<email>prafulrai522@gmail.com</email>
</author>
<published>2025-06-26T10:03:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7a70f642d3e91a967247ab660bf30e574ce75cca'/>
<id>urn:sha1:7a70f642d3e91a967247ab660bf30e574ce75cca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #140715 - lukaslueg:oncecellsyncdocs, r=tgross35</title>
<updated>2025-06-03T05:03:42+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-06-03T05:03:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=55f7571a7e241830abfd16ac09153470468793b6'/>
<id>urn:sha1:55f7571a7e241830abfd16ac09153470468793b6</id>
<content type='text'>
Clarify &amp;mut-methods' docs on sync::OnceLock

Three small changes to the docs of `sync::OnceLock`:

* The docs for `OnceLock::take()` used to [say](https://doc.rust-lang.org/std/sync/struct.OnceLock.html#method.take) "**Safety** is guaranteed by requiring a mutable reference." (emphasis mine). While technically correct, imho its not necessary to even mention safety - as opposed to unsafety - here: Safety never comes up wrt `OnceLock`, as there is (currently) no way to interact with a `OnceLock` in an unsafe way; there are no unsafe methods on `OnceLock`, so there is "safety" guarantee required anywhere. What we simply meant to say is "**Synchronization** is guaranteed...".
* I've add that phrase to the other methods of `OnceLock` which take a `&amp;mut self`, to highlight the fact that having a `&amp;mut OnceLock` guarantees that synchronization with other threads is not required. This is the same as with [`Mutex::get_mut()`](https://doc.rust-lang.org/std/sync/struct.Mutex.html#method.get_mut), [`Cell::get_mut()`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.get_mut), and others.
* In that spirit, the half-sentence "or being initialized" was removed from `get_mut()`, as there is no way that the `OnceLock` is being initialized while we are holding `&amp;mut` to it. Probably a copy&amp;paste from `.get()`
</content>
</entry>
<entry>
<title>Clarify &amp;mut-methods' docs on sync::OnceLock</title>
<updated>2025-05-28T16:31:28+00:00</updated>
<author>
<name>Lukas Lueg</name>
<email>lukas.lueg@gmail.com</email>
</author>
<published>2025-05-06T19:49:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=200d742984ddd7eb1c96db09882217fcb1a1a146'/>
<id>urn:sha1:200d742984ddd7eb1c96db09882217fcb1a1a146</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #140369 - jplatte:mutex-rwlock-data-ptr, r=Amanieu</title>
<updated>2025-05-28T14:28:07+00:00</updated>
<author>
<name>Trevor Gross</name>
<email>t.gross35@gmail.com</email>
</author>
<published>2025-05-28T14:28:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5f17779a03746af581d8867449b1627404d8cd3f'/>
<id>urn:sha1:5f17779a03746af581d8867449b1627404d8cd3f</id>
<content type='text'>
Add data_ptr method to Mutex and RwLock

Implementation of https://github.com/rust-lang/rust/issues/140368 / https://github.com/rust-lang/libs-team/issues/531.

I tried to write a useful safety section about when it is safe to read or write through the returned pointers, but couldn't come up with something nice. Hoping this PR is still useful without that. I'm happy to add any doc strings other people come up with if needed before merge, of course.

Unresolved questions:

- Return a `LockResult` or not?
- Return `*mut T` like existing APIs (`Cell::as_ptr` / `MaybeUninit::as[_mut]_ptr` / `Vec::as_ptr` / ...) or be more precise and return `NonNull&lt;T&gt;`?
</content>
</entry>
</feed>
