更新时间:2023-02-16 14:58:49
使队列出队< T>或ConcurrentQueue< T>并使用 ThreadPool.QueueUserWorkItem [
Dequeue your Queue<T> or ConcurrentQueue<T> and use ThreadPool.QueueUserWorkItem[^] to create threads that handles MySql INSERT statements.
But this can make a high load on MySql and connection creations. Perhaps it is better to do chunks of inserts ?