Re: [Harbour] Re: MT question #2

2009-01-20 Thread Lorenzo Fiorini
On Tue, Jan 20, 2009 at 1:20 PM, Przemyslaw Czerpak wrote: > Probably you generated non unique file names for them. > You will have to change your code. Thanks, I've changed it and know it seems to work better. best regards, Lorenzo ___ Harbour mailin

Re: [Harbour] Re: MT question #2

2009-01-20 Thread Lorenzo Fiorini
On Tue, Jan 20, 2009 at 12:54 PM, Viktor Szakáts wrote: > Did you try hb_FTempCreate()? > hb_FTempCreate( cDir, cPrefix, FC_NORMAL, @cFileName ) ) -> fhnd Thanks, I'll try it. best regards, Lorenzo ___ Harbour mailing list Harbour@harbour-project.org

Re: [Harbour] Re: MT question #2

2009-01-20 Thread Viktor Szakáts
Hi Lorenzo, Did you try hb_FTempCreate()? hb_FTempCreate( cDir, cPrefix, FC_NORMAL, @cFileName ) ) -> fhnd Brgds, Viktor On Tue, Jan 20, 2009 at 12:48 PM, Lorenzo Fiorini wrote: > On Tue, Jan 20, 2009 at 12:39 PM, Przemyslaw Czerpak > wrote: > > > Harbour recognize that the same file is reope

Re: [Harbour] Re: MT question #2

2009-01-20 Thread Przemyslaw Czerpak
On Tue, 20 Jan 2009, Lorenzo Fiorini wrote: > I'm getting some errors with temporary files used to sort or index ( > though in a stress test ). Probably you generated non unique file names for them. You will have to change your code. > What's the best way to get a unique temporay file in the same

Re: [Harbour] Re: MT question #2

2009-01-20 Thread Lorenzo Fiorini
On Tue, Jan 20, 2009 at 12:39 PM, Przemyslaw Czerpak wrote: > Harbour recognize that the same file is reopen using it's inode not > name so even if you create hard or soft links to given file then > it will be detected that the same file is open and existing open handle > reused in new workarea.

Re: [Harbour] Re: MT question #2

2009-01-20 Thread Przemyslaw Czerpak
On Tue, 20 Jan 2009, Lorenzo Fiorini wrote: Hi, > I've tried a small test and it works as expected so it must be sth more > complex. > When I open the dbfs I also create some temporary dbfs. > I use a simple if file() to check if there is already a temp file with > that name and if yes I change

[Harbour] Re: MT question #2

2009-01-20 Thread Lorenzo Fiorini
On Tue, Jan 20, 2009 at 11:04 AM, Lorenzo Fiorini wrote: > I could protect the dbfopen with a mutex. Is it safe to create a > static hash that holds the mutexes in the main thread and access it > using a function? Sorry if I continue to reply to myself but with a mutex like: in the main thread

[Harbour] Re: MT question #2

2009-01-20 Thread Lorenzo Fiorini
On Tue, Jan 20, 2009 at 9:44 AM, Lorenzo Fiorini wrote: > Now the menus are ok but I have problems with the dbfs. > ... > I've searched in the mailing list and in the ChangeLog and what I > found seems to state that workareas are local to threads. I've tried a small test and it works as expected