Introduced
WCF (Windows communication Foundation)-Concurrency (Concurrent):
1, ConcurrencyMode.Single: single-threaded concurrent mode. system automatically lock, no concurrency problems
· Instancecontextmode.percall: Each thread will be assigned a new instance
· Instancecontextmode.persession: Each session is assigned a new instance, and there will be only one thread-action instance in each of the sessions
· Instancecontextmode.single: Unique instance, only one thread action instance in concurrent invocation
2. Concurrencymode.reentrant: A single threaded concurrency mode that can be reentrant. This mode takes effect when there is a reentrant (callback) operation, and the thread returned from the callback enters the queue's tail line
· Instancecontextmode.percall: Each thread is assigned a new instance, and when there is a callback, a deadlock is generated if the single concurrency mode is used (1, the calling service, 2, the callback client, 3, the service end, 1 is locked, Can not execute at 3, so deadlock), this time should use reentrant concurrency mode
· Instancecontextmode.persession: Each session is assigned a new instance, and there will be only one thread action instance in each sessions, which can be reentrant
· Instancecontextmode.single: A unique instance in which only one thread action instance can be called concurrently, and the global reentrant
3, Concurrencymode.multiple: Multithreading concurrency mode. The system does not automatically lock, there are concurrent problems
· Instancecontextmode.percall: Each thread will be assigned a new instance with no concurrency problems
· Instancecontextmode.persession: Each session is assigned a new instance, and there are concurrent problems with multiple instances of multithreaded operations
· Instancecontextmode.single: Unique instance, allows multithreading concurrent operation instance, has concurrency problem