-
I'm going through the rust book and have gotten to the Dining Philosophers section, at which point I've encountered the following text:
`We choose the String type for the name, rather than &str.`
No…
-
E.g., this straightforward dining philosophers implementation: https://github.com/jwaldmann/dejafu/blob/master/dejafu/examples/Diner.hs has
```
forM [1..n] $ \ p ->
(if p < n then void . forkIO …
-
This code...
```
use std::thread;
struct Philosopher {
name: String,
}
impl Philosopher {
fn new(name: &str) -> Philosopher {
Philosopher {
name: name.to_string(),
…
-
Is it possible to compile code that deadlocks in Rust? I'm trying to break the [Dining Philosophers](https://doc.rust-lang.org/book/dining-philosophers.html) code and get it to deadlock but I can't se…
-
Added coreASM to my epsilon toy box.
Copy and pasted Dining Philosophers into new *.casm file over default text.
Got:
INFO - parsing file D:\Safety\epsilon\safetyw\coreasm_sandpit\untitled.casm
org…
-
In chapter [2.3 Dining Philosophers](https://doc.rust-lang.org/book/dining-philosophers.html) the `map` function is used to call a closure for every philosopher. The closure however is only executed f…
-
Migrated from [rt.perl.org#126029](https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126029) (status was 'resolved')
Searchable as RT126029$
-
Near the top of the Dining Philosophers book example, as displayed on https://doc.rust-lang.org/book/dining-philosophers.html :
> Here, we make a [struct][struct] to represent a philosopher. For now,…
-
The first output of the threaded example is:
```
Gilles Deleuze is eating.
Gilles Deleuze is done eating.
Friedrich Nietzsche is eating.
Friedrich Nietzsche is done eating.
Michel Foucault is eating.…
-
subj