VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering

You are here: Visual Basic > Advanced VB6 tutorial > Chapter 12

Deciding Between SingleUse and MultiUse Server Classes

If your server is out-of-process (an ActiveX EXE), you have to make the choice between implementing each of its externally creatable classes as a SingleUse or MultiUse object.

The main advantage of a MultiUse server is that it uses less system resources because the ActiveX Manager needs to run fewer copies of it. The main reason to use a SingleUse server is to reduce "blocking" of one client's use of a method by another client.

Blocking can happen when a server is MultiUse and more than one client is trying to call the same code at the same time. The single copy of the server will attempt to satisfy requests for the same service from more than one client at a time. Because all the instances of a MultiUse server run in a single thread, one client's requests for a service from the server will effectively block all other requests for that service until the request is completed.

If you have time-intensivecode in your server and expect several instances of the server to be active at the same time, you can avoid end-user frustration by making the server SingleUse so that clients don't experience delays while they queue up for their turn to use a MultiUse server.


<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved