Without reentrancy this would mean a deadlock, as shown in the download.
by default, the completion callback of an asynchronous WCF call comes in on a thread from the thread pool.
By installing the custom synchronization context and then opening the host, all client calls are always routed to the same thread, thus establishing thread affinity between all instances and all endpoints of the service.
The solution demonstrates IDesign Thread Affinity Behavior Attribute - a custom service behavior attribute that makes all service instances (regardless of the service instance mode or concurrency mode) execute on the same thread. NET 2.0 synchronization context that always marshals the calls to the same thread.
The calls are sorted based on priority, then executed.
The client provides the priority to the proxy constructor.
The IDesign serviceware downloads is a set of original techniques, tools, utilities and even breakthroughs developed by the IDesign architects.
The utilities are largely productivity-enhancing tools, or they compensate for some oversight in the design of . The demos are also used during our Master Classes to demystify technical points, as lab exercises or to answer questions.
All that is doe using a simple directive to Svc Util: the /asyc switch that generates an asynchronous proxy.
The download contains a sample asynchronous and synchronous proxy and a matching client, that uses a complete method to be notified when the call returns.
By default WCF will not let a service callback within a service operation to its clients.
The reason is that by default the service uses single-threaded access – only one client is allowed to call it at a time.
This is strictly a client-side feature, and the service itself is completely unaware that it is being called asynchronously.