Thread vs ThreadPool

后端 未结 11 2203
鱼传尺愫
鱼传尺愫 2020-11-22 15:57

What is the difference between using a new thread and using a thread from the thread pool? What performance benefits are there and why should I consider using a thread from

11条回答
  •  隐瞒了意图╮
    2020-11-22 16:44

    Using a pool is a good idea, if you don't know or can't control how many thread will be created.

    Just have an issue with a form using thread to update some field from a database on a positionchanged event of a list control(avoid freez). It took 5 minutes for my user to have an error from the database (too many connexion with Access) because he was changing the list position too fast...

    I know there is other way to resolve the base problem (including not using access) but pooling is a good start.

提交回复
热议问题