VB Com and Threading issues 
Author Message
 VB Com and Threading issues

I have been writing VB Com objects for almost a year now and came across an
interesting problem. It has come to my attention that even though my VB Com
object spins off mutliple threads that in fact it is really not true
multithreading and that all requests still come through a single channel. Is
this true? Is this based upon a class? In otherwords if I have multiple
functions within a single class are all the finstions within this class
limited by this single channel? If so is it smarter to create smaller
classes? I am looking for a solution to extend this alleged single channel
affect. In C++ I am told you need to implmement special coding to atually
achieve true independent channels of threading. I hope I do not so more
confused than I actual am. I am trying to gain more insight to VB threading
and its limiting factors.

Thanks



Wed, 03 Jul 2002 03:00:00 GMT  
 VB Com and Threading issues
Hello,

VB uses only one Mainthread. Within this Apartment there are running all
items.
You can't ( and you should not using API) create a second thread with vb.

Best Regards
Josef Vetter



Quote:

> I have been writing VB Com objects for almost a year now and came across
an
> interesting problem. It has come to my attention that even though my VB
Com
> object spins off mutliple threads that in fact it is really not true
> multithreading and that all requests still come through a single channel.
Is
> this true? Is this based upon a class? In otherwords if I have multiple
> functions within a single class are all the finstions within this class
> limited by this single channel? If so is it smarter to create smaller
> classes? I am looking for a solution to extend this alleged single channel
> affect. In C++ I am told you need to implmement special coding to atually
> achieve true independent channels of threading. I hope I do not so more
> confused than I actual am. I am trying to gain more insight to VB
threading
> and its limiting factors.

> Thanks



Fri, 05 Jul 2002 03:00:00 GMT  
 VB Com and Threading issues

Quote:
> VB uses only one Mainthread. Within this Apartment there are running all
> items.
> You can't ( and you should not using API) create a second thread with vb.

Actually, you can, but it's a tricky process and you have to be very careful
lest you crash VB. See the June '99 issue of VBPJ (www.vbpj.com) for a great
article that describes exactly what you need to do.

Regards,
Russell Davis
MS VB MVP



Fri, 05 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB Threading issue

2. VB Threads vs. Timers Design Issue

3. VB-VBScript COM Threading

4. Lost threads in VB-Com component

5. VB and COM threading

6. VB-COM Threading Model

7. VB, Threading and COM Problems

8. Issue with VC++, VB, COM+ and COM.

9. Threading issue..

10. Is there an issue with Suspended threads leaking?

11. Seeking advice on threading issues

12. Synchronization issue - Threading (volatile keyword)

 

 
Powered by phpBB® Forum Software