Closed josej69git closed 5 years ago
I apologize for not replying to this sooner. Apparently, I was not setup to receive notifications from GitHub.
Regarding the issue, it looks like I accidentally had experimental support for a feature turned on, and that may be causing your issue. I turned it back off. Please grab the latest version of parallelfox.vcx/vct and try again. Let me know if that fixes the problem.
Joel, thaks a lot! You were right! That was the issue...
hi. all tests i am doing works perfectly in debug mode but if i try to use in production nothing works and foxpro cannot be closed. can you try this example (final.prg)?
Clear _vfp.AutoYield = .T. Local Parallel As Parallel Parallel = Newobject("Parallel", "ParallelFox.vcx") Parallel.StartWorkers(Fullpath("final.prg"),,.t.) && debugmode FALSE don't work Parallel.SetWorkerCount(Iif(Parallel.DetectHyperThreading(),Parallel.CPUCount/2,Parallel.CPUCount)) _Screen.AddObject("eventos", "MyHandler") Parallel.Bindevent("Complete", _Screen.eventos, "oncomplete") For i = 1 To 10 ?i Parallel.do("prueba",,,i) Parallel.Call("prueba",,i) Endfor Parallel.Wait() Parallel.StopWorkers() Parallel.Wait() Parallel=Null ?"ended" messagebox("ended") Return
Procedure prueba(cas) ?cas strtofile(str(cas),"_wor"+alltrim(str(cas))) *Messagebox(cas) Return cas Endproc
Define Class MyHandler As Custom Procedure oncomplete Lparameters retorno ?"thread finished" Endproc Enddefine