>I'm writing a "web server" application in vfp 6.0 sp 5 using the Mabry HttpServer Com object and the vfpcom.bindevents to interact with Mabry object events. I write a class for events code. It work. I can send html page correctly.
>But in some Mabry events there is a lot of code, needed for page creation. I'm crazing trying to "multithread" this code.
>I created, of course, a class with all of the code needed to page creation in a class compiled as "multithread". But request of new users (explorer clients) are executed only after no other requests are in process.!?
>It seem's not a Mabry, but a Vfp problem.
>
>I tried also the vfpmtapp.dll of Remus Rusanu. Very Good. It seems to excecute my code concurrently but I have a lot of vfp crash.
>
>Any idea of I can return from the requetdone event of Mabry more quicly and try to execute the "page creation" job as a separate thread ?
If you're willing and able to poll for completion of the async process, you can spawn a separate process to handle this code and run it asynchronously to the Mabry event. However, lacking callbacks, and having an unconditional termination of a method call on return, you'll need to poll for completion through a separate method to determine when the asynchronous job has completed, in order to continue your split method and render the result in the same context as the original call occurred. This is something that VFP is not well suited to implementing as an STA application. I'd tend to fall back on implementation using C++/ATL and a free-threaded model for the project, which would offer a number of distinct advantages over VFP as far as thread management.