Does anyone know why the following code does not run multithreading? I have compiled the class below with MultiEXE and MultiUSE. I call it with the following commands, BUT it waits until the first ServerExec completes. I would like it to return and be able to start the second one.
Any ideas
Thanks, -Costas
* Called as follows
obj=createobject('foxqlsvr.serverclass')
obj.serverexec('1') && Waits here for completion
obj.serverexec('2')
*** EXE Multithreading Class compiled seperately ****
Define class ServerClass as custom OLEPublic
Procedure ServerExec(parm)
Do case
Case parm='1'
* Take a long time
f1=fcreate('case1.txt')
fput(f1,time())
for i=1 to 5000
use test alias test
select * from test into temp
use
use in test
endfor
fput(f1,time())
fclose(f1)
Case parm='2'
* Take a short time
f2=fcreate('case2.txt')
fput(f2,time())
fput(f2,time())
fclose(f2)
endproc
Enddefine