Hi Viktor,
Il 02/06/2009 19.24, vszak...@users.sourceforge.net ha scritto:
Revision: 11191 http://harbour-project.svn.sourceforge.net/harbour-project/?rev=11191&view=rev Author: vszakats Date: 2009-06-02 17:24:02 +0000 (Tue, 02 Jun 2009) Log Message: ----------- 2009-06-02 19:22 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * contrib/xhb/Makefile + contrib/xhb/bkgtsks.c + Added background tasks functions. My only current goal was to make it compile under Harbour, plus did some optimizations along the way. (borrowed from xhb, work of Francesco Saverio Giudice) ; TODO: Adapt to Harbour: MT mode, Set() replacement, attach it to VM possibly without modifying the VM itself.
I have a background tasks version that works in ST (using my original work, that is what you have ported also if I didn't already check it) and an MT version that uses threads but using same syntax of ST mode. But to make it working from xhb lib there is needs to have some code that permits to inject code inside VM, either inside hb_vmExecute() than in hb_vmQuit(), from an external lib or, as I did, having defines that isolate code using a HB_BACKGROUND_TASKS define so you can decide to add background tasks code or not using hbsetup.ch. Last version I adopted in my local repository. In my code I use some defines and, in particular, HB_MT_VM to alter code behavior. The only problem I found is that at PRG level HB_MT_VM is not defined so I changed make system to define it also at PRG level. All above I did in an old repository that is not updated to current SVN so it is possible that now the behavior is different. I have to check it.
Tell me if it can interest. Best regards, Francesco _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour