tungstenite has a decent performance (it has been used in production for real-time communication software, video conferencing, etc), but it's definitely not the fastest WebSocket library in the world at the moment of writing this note. If performance is of a paramount importance for you (...
In essence,tokio-tungsteniteis a wrapper fortungstenite, so the performance is capped by the performance oftungstenite.tungstenitehas a decent performance (it has been used in production for real-time communication software, video conferencing, etc), but it's definitely not the fastest WebSocket libr...
该示例代码创建了一个包含 9 个元素的 Vec,然后使用 Arc 和 Mutex 包装了该 Vec。接着,我们创建了 3 个线程,每个线程负责修改 Vec 的三分之一元素的值。在每个线程的执行体中,我们使用 Mutex 来获取 Vec 的写锁,并修改 Vec 中的元素。最后,我们等待所有线程完成,并输出修改后的 Vec。
In essence,tokio-tungsteniteis a wrapper fortungstenite, so the performance is capped by the performance oftungstenite.tungstenitehas a decent performance (it has been used in production for real-time communication software, video conferencing, etc), but it's definitely not the fastest WebSocket libr...