Timeline for Simple multithreaded chat server in Rust
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 3, 2019 at 10:33 | comment | added | user3447239 |
Pretty sure that your unsafe example invokes undefined behavior. When you move a value out of a location, corresponding memory location is considered uninitialized. Here you take a pointer to that location, and then dereference it after moving the value out of there - so you dereference a pointer to uninitialized memory.
|
|
Dec 8, 2018 at 12:00 | history | edited | Ömer Erden | CC BY-SA 4.0 |
added solution with ignoring borrow-checker
|
Dec 6, 2018 at 14:51 | comment | added | Ömer Erden | @francesc For the first question; yes in scoped thread you'll not need an Arc but i don't know how crossbeam handles the sharing inside. It would be great if someone knows | |
Dec 6, 2018 at 14:46 | history | edited | Ömer Erden | CC BY-SA 4.0 |
Edit for questions in comment section
|
Dec 5, 2018 at 12:37 | comment | added | francesc |
I see...a functional aproach. Some questions: 1.- I guess scoped threads (crossbeam) would get rid of Arc . 2.- Can we get rid of nick.clone() and keep a simple reference? I guess not because cannot move out of borrowed content despite nick being immutable. 3.- can we filter on value references instead of key objects? Thanks for the review, much clearer code
|
|
Dec 5, 2018 at 10:49 | history | edited | Toby Speight | CC BY-SA 4.0 |
Spelling and grammar
|
Dec 5, 2018 at 10:35 | review | First posts | |||
Dec 5, 2018 at 10:49 | |||||
Dec 5, 2018 at 10:34 | history | answered | Ömer Erden | CC BY-SA 4.0 |