Why?
Currently, mupdf-rs supports the Cookie struct which is designed to be sent across threads and locked by the inner locks initialized in the main context.
The Cookie struct can be used to abort a current rendering session on another thread by setting the abort flag.
The problem is that the Cookie struct in mupdf-rs is just a wrapper struct holding a raw mut pointer which implements the !Send trait which means that it cannot be used across multiple threads without using unsafe.
Why?
Currently, mupdf-rs supports the
Cookiestruct which is designed to be sent across threads and locked by the inner locks initialized in the main context.The
Cookiestruct can be used to abort a current rendering session on another thread by setting the abort flag.The problem is that the
Cookiestruct in mupdf-rs is just a wrapper struct holding a raw mut pointer which implements the!Sendtrait which means that it cannot be used across multiple threads without usingunsafe.