|
-
Jul 5th, 2002, 04:59 AM
#1
Thread Starter
Junior Member
Multi-threaded -Performed illegal operation
hi all genious out there ......,
I am facing a problem in using multi-threading .......
i have active-x exe which is apartment model of threading with thread per object option.Each class in it is multi-use...
From the exe ...
I create a object of a class say objclass1 and it starts executing asyncronously in its own thread. This class also starts another class i.e classMessenger which also runs in its own thread.
In my exe i maintain the reference to objclass1 and also to classMessenger.My exe and class1 interact with each other through the classMessenger to know the status etc(thus avoiding blocking of each other when each is busy with something else)
similarly i create another object of another class say objclass2 and get it run asyncronously (with classmessenger and all)
now both the class class1 and class2 run simultaneously and asyncronously ..right ......
(now if i want to inform or get its status or ask it to cancel i do it through the classMessenger ...well this is just extra information)
now as it is running ...
i set the reference to objclass1 as nothing and keep the reference to objclass2 as it is...(still both threads continue to run and that is fine )
but at the end when both objclass1 and objclass2 have finished processing it gives a error saying the active-exe (in fact the project name) has performed an illegal operation ....
if u could help me ............thanks
i hope i have clarified the things ........
c u
-
Jul 5th, 2002, 03:03 PM
#2
IF you created the ActiveX in VB - note:
Threading in VB 6.0 has a known bug - it crashes the thread. It has not been fixed by any service pack of VB 6.0 It is fixed in VB.NET, however.
-
Jul 6th, 2002, 03:28 AM
#3
Thread Starter
Junior Member
thanks .......
thanks ...,
but i am using vb 5....
in my case the thread survives itself till the very end point ....
but i guess at the end of the thread when it finds that it is not referenced by any object(i.e i have set the reference to nothing before it actually completes) may be it is crashing .....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|