4
jestdotty
36d

*tries to make something elegant*

*tangles*

???

turns out converting mutexes to mpsc isn't as easy as I thought it would be 😭
also can the AIs stop sucking. they're my only source of information

Comments
  • 4
    Then read documentation instead.
  • 1
    What does mpsc has to do with mutexes? I mean, if you need shared data, you probably still need mutex. Even with that. I did check the crate just now. Am I wrong?
  • 1
    @jestdotty But where the locks come from? Do you nest mutexes or something? Take my sodoku generators. they're massive in sharing date, most puzzles are generated and solved in a ms. To add this to statistics, every thread locks the data of the main process -> pushes data -> continues. During the mutex lock NOTHING happens besides copy of data. The preparation of the how the data should be and stuff is done before. I can lock thousands of times in a second without issue. Performance difference without lock isn't that much but it's dangerous.

    The server I'm working now doesn't use heap at all. Everything is preserved. So freaking stable. IF you have a C application good stable, it directly also feels like the most stable thing ever, because you know every detail. Valgrind says no leaks possible. Cool, it just had a few hundred concurrent connections transferring GIGABYTES. No byte left after that.
Add Comment