Mara Bos
24fe35a3e1
Remove argument from closure in thread::Scope::spawn.
2022-03-03 13:04:14 +01:00
Mara Bos
465c405418
Add test for thread::Scope invariance.
2022-01-22 17:15:08 +01:00
Mara Bos
4cb73704e2
Mention *scoped* thread in panic message.
...
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com >
2022-01-05 11:17:11 +00:00
Mara Bos
aa9c0881ef
Note the invariance over 'env in Scope<'env>.
2022-01-05 12:14:32 +01:00
Mara Bos
5bd5781823
Fix missing .load() in Scope's Debug impl.
2022-01-05 12:14:32 +01:00
Mara Bos
a9efbaf3a5
Rename n_running_threads to num_running_threads.
2022-01-05 12:14:32 +01:00
Mara Bos
5b5746f081
Fix typo in Scope::spawn docs.
...
Co-authored-by: deltragon <m@dafert.at >
2022-01-04 18:43:23 +00:00
Mara Bos
c429ade760
Fix typo in is_running() docs.
...
Co-authored-by: Mattias Buelens <649348+MattiasBuelens@users.noreply.github.com >
2022-01-04 18:40:00 +01:00
Mara Bos
09e6665aba
Fix typo in documentation.
2022-01-04 17:05:26 +01:00
Mara Bos
2c8cc70ea0
Use > rather than == for overflow check in scoped threads.
...
Co-authored-by: Jacob Lifshay <programmerjake@gmail.com >
2022-01-04 15:58:29 +00:00
Mara Bos
c5cb2def06
Fix variance of thread::Scope.
2022-01-04 16:57:16 +01:00
Mara Bos
4300bea0c2
Formatting.
2022-01-04 16:32:39 +01:00
Mara Bos
f5217792ed
Simplify panicking mechanism of thread::scope.
...
It now panic!()s on its own, rather than resume_unwind'ing the panic
payload from the thread. Using resume_unwind skips the panic_handler,
meaning that the main thread would never have a panic handler run, which
can get confusing.
2022-01-04 16:10:14 +01:00
Mara Bos
da33da161b
Add documentation for scoped threads.
2022-01-04 16:09:53 +01:00
Mara Bos
cc699e1b62
Add ScopedJoinHandle::is_running().
2022-01-04 15:15:41 +01:00
Mara Bos
0e24ad537b
Implement RFC 3151: Scoped threads.
2022-01-04 14:51:39 +01:00