On Thu, 04 Jun 2009, Pritpal Bedi wrote:

Hi,

> Sorry if something has caused you inconvinience.
> I had just sent to the list Xbase++ published documents
> to better understand MT modal.

And thank you for it.
Sorry if you found my previous message sounded rude.
Just simply I cannot understand how people can create
MT programs without full knowledge about synchronization
conditions. In this case wrong description was presented
by few different persons long time before you sent the parts
from xbase++ documentation. Probably they were also confused
by their documentation.
So far each synchronization/MT mechanism in xbase++ we analyzed
adding some xbase++ compatible extensions to Harbour does not work
exactly like in their documentation. Everywhere tests shows some
differences or anomalies. I do not want to guess which one are
intentional or unintentional.
Just simply I would like to ask xbase++ users to make real life
extensive tests before some new feature will be added to Harbour.

> Here are the results of your sent program.
> C:\harbour\tests>hbmk2 prz -mt -n
> hbmk: Processing configuration: C:\HARBOUR\BIN\hbmk.cfg
> Harbour 1.1.0dev (Rev. 11203)
> Copyright (c) 1999-2009, http://www.harbour-project.org/
> Compiling 'prz.prg'...
> Lines 892, Functions/Procedures 13
> Generating C source output to 'prz.c'... Done.
> prz.c:
> Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
> C:\harbour\tests>prz
> start
> number of buffered signals:          2 WRONG
> and cursor stays here for ever to be killed by task manager

It was expected due to typo in previous commit for setinterval which
enabled unconditional thread restarting. I fixed it in last commit.
But I know previous and current Harbour results - everything was
working as it was designed. The problem for me is knowledge how xbase++
works.

> c:\harbour\tests>xpp przx && alink przx
> Xbase++ (R) Compiler 1.90.326 Dec  9 2005
> Copyright (c) Alaska Software. All rights reserved.
> File: przx.prg Line:  146
> File przx.prg successfully compiled.
> Alaska 32-Bit Linker Version 1.90.326
> Copyright (c) Alaska Software 1997-2005. All rights reserved.
> c:\harbour\tests>przx
> 
> start
> number of buffered signals:          1 OK
> 0. number of threads in normal method.......:          5 OK
> 1. number of threads in sync method.........:          5 OK
> 2. number of threads in deep sync method....:          1 OK
> 3. number of threads in nested normal method:          1 OK
> 4. number of threads in nested sync method..:          5 OK
> Press any key to continue...
> c:\harbour\tests>

Thank you. So I guessed correctly.
I committed alternative sync method implementation so Harbour now gives
the same results.
I haven't removed the old one yet. Before I'll remove it (such cleanup
will greatly simplify some code and allow to use the same synchronization
mechanism for functions and procedure in the future) I would like to see
also other results i.e. for class sync methods and multiple objects of
the same class.

best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to