I looking the best way to code in Rust this:
What library is best to use for this (setting scheduling, pthreads...etc.) ?
For C function mlockall I can use nix library
Most pthread-related functions, types and constants are defined in the
libc crate. You can quite easily define the missing ones yourself. Read up on FFI (Rust by Example provides a brief but perfectly adequate overview if you're in a hurry). The only unintuitive part is dealing with C-style initialization of a
pthread_attr_t typed variable—these days it's done with
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.