Apartment thread or Single thread? 
Author Message
 Apartment thread or Single thread?

Single Thread is always safer than any other threading model because there
is only on line of code execution. But it can have disadvantages if you
want your code to "diverge" in diferent lines. For exemple for a server it
can be usefull to use multiple threads so that every request gets its own
execution time and a small request does'nt have to wait for a long previous
request to end.
If you don't need multiple treads (if you're writing controls to run in IE4
you should use Apartment threading model whenever possible) use single
thread.



Quote:
> Dear sirs,

> I am working with VB5 SP2.
> There is a Thread-Model combo-box in Project Property dialogbox
> which contains two options: Apartment Thread / Single Thread.
> If I create a new ActiveX DLL project which has some forms,
> some controls such as VsFlex can NOT be used because
> the default thread model is Apartment Thread.
> But sometimes I find that some ActiveX DLL project which uses
> the VsFlex control DO be apartment thread model.

> Could you please tell me if the single thread is SAFER than the
> apartment model?

> Thanks in advance.

> Best regards,

> William Luo

> P.S. I have no knowledge about VC.



Sat, 15 Apr 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. single thread and apartment threads

2. Single Thread and Apartment Thread Problem

3. Single Threaded instead of Apartment Threaded ???

4. VB Apartment or Single Threading

5. ActiveX DLL: Single and Apartment Threaded?

6. Apartment vs Single Threaded?

7. Apartment/Single threaded

8. Apartment vs Single Threaded?

9. Can BackgroundWorker be Single Threaded Apartment?

10. Single threaded component -- trying to wrap it in an apartment-threaded component using MTS...is is possible?

11. VB apartment Threading and SQL Server

12. is scripting dictionary still apartment threaded/

 

 
Powered by phpBB® Forum Software