On Mon, 29 Sep 2008, Maurilio Longo wrote:

Hi Maurilio,

> >> PS. BTW, If I press Alt-C process does not stop, probably only single 
> >> thread
> >> gets stopped. See here, I had to press Alt-C two times.
> >> (E:\repository\harbour-svn\tests\mt)mau
> >> Cancelled at: T (9) in mau.prg
> >> Cancelled at: INKEY (0)
> >> MAIN (5) in mau.prg
> >> (E:\repository\harbour-svn\tests\mt)
> > Yes ALT-C stops only the thread which received such key.
> > If this is the main thread then QUIT request is send to all other
> > threads. Otherwise only one thread is terminated.
> IMHO this is 'wrong' since I don't know which thread I'm killing, because
> killing a single thread in a multi-threaded program could create problems to
> the whole program and because I need a way to stop a program without having to
> press Alt-C a few tens of times :)
> So, I'd say that Alt-C should terminate the whole process.

I have different opinion. In the future we will have support for more
then one console windows in some GTs (GTWVT, GTXWC, it's also possible
for GTTRM, GTCRS and GTSLN if they are executed in xWindow) and each
can has its own console window with separate keyboard events.
In such case it will be interesting functionality to kill only
one thread bound with given console not whole application.
Now we should define the access to one console by many threads
and synchronization methods. When we will make it then we can also
add support for sending cancel request to all threads bound with given
console 

Best regards
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to