Closed prostomarkeloff closed 4 years ago
Are you generally asking what a Mutex
is and why it's needed here, or you specifically know that it's possible to not use it here?
Are you generally asking what a
Mutex
is and why it's needed here, or you specifically know that it's possible to not use it here?
The second. I see no reasons why using it (or maybe I look bad :)). With a half of the first :). I really don't understand why Mutex is used here.
You're right :man_facepalming:. Arc
isn't needed as well. Sharing a &APIClient
between threads works.
Thanks!
https://github.com/u32i64/vk-bot/blob/master/src/context.rs#L18