Open monadbobo opened 2 years ago
For example if I use the same pool object in multiple tokio tasks will there be undefined behavior.
Or should I share the connection through Arc in different tasks, or should each task call pool.clone() to share the connection。
Yes, it's thread safe. 'pool.clone()' and sharing the connection through Arc will both work correctly.
For example if I use the same pool object in multiple tokio tasks will there be undefined behavior.
Or should I share the connection through Arc in different tasks, or should each task call pool.clone() to share the connection。