svix-webhooks icon indicating copy to clipboard operation
svix-webhooks copied to clipboard

Replace tokio mutex with std mutex

Open ghost opened this issue 1 year ago • 2 comments

IMHO, I suggest that replacing tokio::sync::Mutex with std::sync::Mutex can potentially lead to better performance outcomes. This assertion is based on the design differences between the two mutex implementations, particularly in asynchronous contexts.

For further insights, check out the following resources:

Discussion on this topic. Never use Tokio mutexes. tokio::sync::Mutex documentation.

ghost avatar Aug 30 '23 15:08 ghost

Please feel free to open a PR!

tasn avatar Sep 01 '23 11:09 tasn

Whoops, didn't mean to close it. :)

tasn avatar Sep 01 '23 11:09 tasn