If you need high-performance and fine control of synchronization, just use a low-level systems programming language.
If you need high-performance and fine control of synchronization, just use a low-level systems programming language.
I discovered last year that Wine has terrible internal lock problems inside its user-side storage allocator. That's in C. If you have enough threads calling "realloc", the allocator goes into futex congestion collapse and performance drops by two orders of magnitude. My graphics program went from 60 FPS to 0.5 FPS. They optimized too hard for the no-congestion case.
This is a Wine-only problem; Microsoft's own code doesn't have this problem.
I've had lock congestion problems in Rust. Sometimes you need a fair mutex, or something gets frozen out. Both fair and non-fair mutexes are available; see the "parking_lot" crate.
There's a place inside WGPU that has a lock congestion problem in one of three locks, and I'm going to have to add more profiling to someone else's code to find that. I can see the problem with Tracy, but need to add more profiling scopes to narrow it down.
But that is high-performance graphics stuff, where microseconds count. Sending spam (OK, bulk marketing emails) doesn't need to be that tightly coupled. Mailing list removal runs on a timescale of days, not milliseconds. What else in that space has to be tightly interlocked?
If you can run on Windows try Superluminal.
Only languages like C++ have a memory model that allows you to do lock-free programming for example (C and Rust copied the C++ model).
Also, what kind of serious person allocates memory from the system allocator in a real-time loop? Your problems seem self-inflicted. Regardless there are many allocators that optimize for concurrent allocations: tcmalloc, jemalloc, mimalloc...
What's "quirky" is trying to use all the CPUs with lower priority threads.
Go makes you think you control the details except you don't. Hackernews makes you think you don't control the details in C# except you do.
Yet another project that would have been able to solve its woes if it had picked a better option.
[0] - https://pkg.go.dev/runtime#LockOSThread
[1] - https://pkg.go.dev/golang.org/x/sys/unix#SchedSetaffinity