|
-
Nov 29th, 2003, 04:37 PM
#1
Thread Starter
New Member
How to release the calling thread(?). . .
Hello,
Can anyone answer a question I have about ActiveX Exe com rules. . .
I have a component (A) compiled for unattended execution and thread pool set to 1. We have another component (B) calling a function (or method) on a multiuse class of com A. So, is the calling thread, on com B, released immediately or is it blocked untill the function it called on com A returns? I thought the whole benefit of Com Exe was to get the calling thread released for other use, but I just read somewhere that you need to design the called function so that it returns immediately by enabling a timer, where the timer event actually performs the code you want.
Is this true? And if so, is there another way to force the release without a $@#! timer?
-
Dec 2nd, 2003, 01:48 AM
#2
Addicted Member
I can suggest you 2 ways.
1. Convert your AxExe to AxDLL ald Set the threading model to Apartment.
2. In your AxExe deselect the thread pool and select the 'Thread Per Object' option button.
In either case you won't get synchronization. There is no point in writing the client to do some other work while the first component releases it's resourse. You need to write your server code in such a way that it should tolerate the load and work fine for n number of clients. (n means not an infinite. You must decide on how many clients can connect at the maximum).
If you wan't synchronization forget the two ways I told you, keep continue with your existing code, but fine tune the server component.
-Jai
See you,
-Jai
[Friends Never Say Good Bye]
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
|