Any chance Mutex::new() will become a const fn?

I'm curious if anyone knows whether Mutex::new() might become a const fn someday. It would be really lovely to be able to creates someday a static mutex without requiring a OnceCell (or lazy_static).

The standard library mutex allocates, so it cannot be a const fn without changing its implemenation. The one in parking_lot can be used instead.

4 Likes

It also performs some syscalls.