by nageswaragunupudi » Tue Mar 25, 2008 6:43 am
> Also keep in mind that you can use low level C language multithreading as it is 100% supported by the C compiler.
I would be interested to know how to use C language multi-threading within a xHarbour + FWH application.
My need for multi-threading is very simple. I show browses of large tables from ADS server. I also show totals of certain columns in the footers. I get the totals using ADS Sql ( eg. SELECT SUM(DUES) FROM CUSTOMER WHERE <cond> ). The number of rows in the browse depend upon the options specified by the user. If the rows are too many the Sql query for totals take some time upto 30 secs. I do not want the user to wait.
I like to show the browse, make the sql query in another thread, and when the answer is ready refresh the footers.
ADS does not support Async queries ( ace32 or oledb). So that option is ruled out.
I think we do not know how far xharbour, adsrdd and fwh are multithread-safe. In any case I think adsrdd is not multithread compatible. If I know how to use C language multi threading within FWH + xHarbour application, I can write appropriate C code to use ACE32.DLL to query the server.
Without using multi-theads, I am aware I have a few other options, but I am more interested in using the multi-thread approach, if it is possible.
By the way, ADS Serverside filters work like miracle even with hundreds or users simultaneously accessing huge tables with million rows.
Regards
G. N. Rao.
Hyderabad, India