Closed 1995parham closed 2 years ago
The idea of using a mutex is corret, we just need to wrap surfaces with a mutex instead of RefCell
in https://github.com/danyspin97/wpaperd/blob/main/src/main.rs#L84.
Sure, I will change it to use mutex on surfaces.
I tried to use Mutex instead of RefCell
, I hope it is okay :see_no_evil:
Yea, it is okay. Thank you for your PR! 😄
Resolve #10
I have added mutex to prevent multiple mutable reference at the same time, and it works.