C# Windows Application - Many threads using the same connection?

后端 未结 3 1479
借酒劲吻你
借酒劲吻你 2021-01-05 23:42

I\'ve got a c# WINDOWS Application that is multi-threaded. It is my understanding that in a web environment, connections are pooled automatically. It is also my understandin

3条回答
  •  [愿得一人]
    2021-01-06 00:03

    ok - so this assumption of mine was brought on by observation: When I tried a win app setup in the typical pool fashion, I always experience a 3-5 second delay while a real connection is established to the remote server. Even when I did an open, then a close, the next query would always have this delay.

    When the server connects, it obviously doesn't establish a connection for each connection in the pool. Also, is the pooling mechanism smart enough to grab a connection that it knows is already open or is it possible for it to simply grab any random connection?

    What is the default max connections in the pool?

提交回复
热议问题