Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-24 Thread IvankoB
>> How do You debug threaded apps ? >> > Open the thread window, select the thread you want to debug. Linux gdb > works > better for debugging threads then the Windows version. > Sometimes 'Project'-'Options'-'Call GUI_DEBUGBEGIN/GUI_DEBUGEND must be > activated in order to prevent gdb crashes. >

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-24 Thread Martin Schreiber
On Tuesday 24 July 2012 10:05:16 IvankoB wrote: > Strangely but the below code doesn't redraw the label if called from > OnTerminate > (checked for sure that the program flow enters this code) > //--- > > begin > //application.lock; > try >{выйти из прогр

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-24 Thread IvankoB
Strangely but the below code doesn't redraw the label if called from OnTerminate (checked for sure that the program flow enters this code) //--- begin //application.lock; try {выйти из программы по завершении sender.OnExecute} case RESULTCODETY(ExitC

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Martin Schreiber
On Monday 23 July 2012 22:57:43 Ivanko B wrote: > Which are conditions of terminating (finishing) thread ? > Exiting onexecute. Martin -- Live Security Virtual Conference Exclusive live event will cover all the ways today

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Ivanko B
Which are conditions of terminating (finishing) thread ? 2012/7/24, Ivanko B : > Set the global > variable "ExitCode" and set application.terminated to true. > = > This looks as a solution. > > 2012/7/23, Sieghard : >> Hallo IvankoB, >> >> Du schriebst am Mon, 23 Jul 2012 17:02

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Ivanko B
Set the global variable "ExitCode" and set application.terminated to true. = This looks as a solution. 2012/7/23, Sieghard : > Hallo IvankoB, > > Du schriebst am Mon, 23 Jul 2012 17:02:02 +0500: > >> PS: Since me still can't get proper threading mechanics, Me have dead >> lock in

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Sieghard
Hallo IvankoB, Du schriebst am Mon, 23 Jul 2012 17:02:02 +0500: > PS: Since me still can't get proper threading mechanics, Me have dead > lock in my application. Did you make sure that all ressources are reserved strictly in the sme order everywhere they're used? Requesting ressources in varying

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Martin Schreiber
On Monday 23 July 2012 20:26:00 Ivanko B wrote: > Can you step into the halt() call? > = > Hmm...me don't have actual FPC sources at that machine. > I would not call halt() in a running application. Set the global variable "ExitCode" and set application.terminated to true. Martin --

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Ivanko B
Can you step into the halt() call? = Hmm...me don't have actual FPC sources at that machine. Welcome in multi thread world! :-) = Too much new - up to overloading my brain :) Threading, SSL|Crypto, networking, HTTP, archiving,.. 2012/7/23, Martin Schreiber : > On Monday 23 July 2

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Martin Schreiber
On Monday 23 July 2012 19:52:50 Ivanko B wrote: > Me mean the HALT(n) call from within a thread but GDB still looks like > the main app is still running & some more inadequate "things" after > that. Can you step into the halt() call? > How do You debug threaded apps ? > Open the thread window, se

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Martin Schreiber
On Monday 23 July 2012 15:06:16 Martin Schreiber wrote: > On Monday 23 July 2012 14:02:02 IvankoB wrote: > > > PS: Since me still can't get proper threading mechanics, Me have dead > > lock in my application. > > This is normal while working with threaded applications. ;-) > Or Welcome in multi thr

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Ivanko B
Me mean the HALT(n) call from within a thread but GDB still looks like the main app is still running & some more inadequate "things" after that. How do You debug threaded apps ? 2012/7/23, Martin Schreiber : > On Monday 23 July 2012 17:47:33 IvankoB wrote: >> Probably. There will be an immediate a

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Martin Schreiber
On Monday 23 July 2012 17:47:33 IvankoB wrote: > Probably. There will be an immediate abort of the program without calling > > > finalize routines. > > Unit's "finalization" is called. But GDB still shows the apllication > running after "halt", is it correct ? > I don't know. Martin -

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread IvankoB
Probably. There will be an immediate abort of the program without calling > finalize routines. > Unit's "finalization" is called. But GDB still shows the apllication running after "halt", is it correct ? -- Live Securi

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Martin Schreiber
On Monday 23 July 2012 14:02:02 IvankoB wrote: > Which are the exact conditions of calling OnStarted, OnExecute & > OnTerminated ? Where form can me terminate, pause & kill the thread ? > " function tthreadcomp.threadproc(sender: tmsethread): integer; begin fthread:= teventthread(sender); try

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Martin Schreiber
On Monday 23 July 2012 14:33:54 Ivanko B wrote: > Probably. There will be an immediate abort of the program without calling > finalize routines. > > Which checks to perform from the thread for already not existing > widgets of main application so that to eliminate AV etc ? > P

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Ivanko B
Probably. There will be an immediate abort of the program without calling finalize routines. Which checks to perform from the thread for already not existing widgets of main application so that to eliminate AV etc ? 2012/7/23, Martin Schreiber : > On Monday 23 July 2012 13:5

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Martin Schreiber
On Monday 23 July 2012 13:52:00 IvankoB wrote: > Also "TThreadComp.terminate" in its OnStarted so that to exit its > OnExecute & OnTerminated on check "if terminated then exit;" > (this approach assumes errors revealed in OnStarted which should stop > further thread running) > It should be. --

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread Martin Schreiber
On Monday 23 July 2012 13:41:35 IvankoB wrote: > Me need to have an application result code. > Probably. There will be an immediate abort of the program without calling finalize routines. Martin -- Live Security Virtual

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread IvankoB
Which are the exact conditions of calling OnStarted, OnExecute & OnTerminated ? Where form can me terminate, pause & kill the thread ? PS: Since me still can't get proper threading mechanics, Me have dead lock in my application. ---

Re: [MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread IvankoB
Also "TThreadComp.terminate" in its OnStarted so that to exit its OnExecute & OnTerminated on check "if terminated then exit;" (this approach assumes errors revealed in OnStarted which should stop further thread running) ---

[MSEide-MSEgui-talk] TThreadComp: is it safe to call HALT(rc) in its OnTerminate ?

2012-07-23 Thread IvankoB
Me need to have an application result code. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions