Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Mattias Gärtner
Zitat von Vincent Snijders <[EMAIL PROTECTED]>: > Florian Klaempfl schreef: > > Mattias Gärtner schrieb: > >> Zitat von Michael Van Canneyt <[EMAIL PROTECTED]>: > >> > >>> [...] > >>> This is the problem: At which point should this be done ? > >>> > >>> Can you point at the statement where it shou

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Vincent Snijders
Florian Klaempfl schreef: Mattias Gärtner schrieb: Zitat von Michael Van Canneyt <[EMAIL PROTECTED]>: [...] This is the problem: At which point should this be done ? Can you point at the statement where it should be raised in the following code: try ... DoParallel(...); ... except

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Florian Klaempfl
Mattias Gärtner schrieb: > Zitat von Michael Van Canneyt <[EMAIL PROTECTED]>: > >> [...] >> This is the problem: At which point should this be done ? >> >> Can you point at the statement where it should be raised in the following >> code: >> >> try >>... >>DoParallel(...); >>... >> e

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Mattias Gärtner
Zitat von Michael Van Canneyt <[EMAIL PROTECTED]>: >[...] > This is the problem: At which point should this be done ? > > Can you point at the statement where it should be raised in the following > code: > > try >... >DoParallel(...); >... > except > end; > > There is only 1 possibl

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Mattias Gärtner
Zitat von Florian Klaempfl <[EMAIL PROTECTED]>: > Mattias Gärtner schrieb: > >> raised ? > > > > It should be raised in the starter thread. The question is how to > > - stop an exception in a thread (try..except) > > - give it to another thread - the starter thread (giving the object is > easy, bu

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Florian Klaempfl
Mattias Gärtner schrieb: >> raised ? > > It should be raised in the starter thread. The question is how to > - stop an exception in a thread (try..except) > - give it to another thread - the starter thread (giving the object is easy, > but > ...) > - continue the helper thread (this will normally

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Mattias Gärtner
Zitat von Marco van de Voort <[EMAIL PROTECTED]>: > In our previous episode, Mattias Gärtner said: > > > > What should happen when an exception occurs? > > > > > > AFAIK any unhandled exception in a thread will cause it to silently die > > > > Yes, and that should never happen. At least not for no

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Michael Van Canneyt
On Thu, 11 Dec 2008, Mattias Gärtner wrote: > Zitat von Michael Van Canneyt <[EMAIL PROTECTED]>: > > > > > > > On Thu, 11 Dec 2008, Mattias Gärtner wrote: > > > > > Zitat von Florian Klaempfl <[EMAIL PROTECTED]>: > > > > > > > Mattias Gärtner schrieb: > > > > > I'm writing a unit to simplify

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Mattias Gärtner
Zitat von Michael Van Canneyt <[EMAIL PROTECTED]>: > > > On Thu, 11 Dec 2008, Mattias Gärtner wrote: > > > Zitat von Florian Klaempfl <[EMAIL PROTECTED]>: > > > > > Mattias Gärtner schrieb: > > > > I'm writing a unit to simplify parallel methods/procedures. > > > > > > > > For example: > > > >

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Marco van de Voort
In our previous episode, Mattias G?rtner said: > > > What should happen when an exception occurs? > > > > AFAIK any unhandled exception in a thread will cause it to silently die > > Yes, and that should never happen. At least not for normal exceptions like out > of memory, index out of bounds, io

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Michael Van Canneyt
On Thu, 11 Dec 2008, Mattias Gärtner wrote: > Zitat von Florian Klaempfl <[EMAIL PROTECTED]>: > > > Mattias Gärtner schrieb: > > > I'm writing a unit to simplify parallel methods/procedures. > > > > > > For example: > > > DoParallel(@AMethod,StartIndex,EndIndex,Data); > > > > > > The AMethod

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Mattias Gärtner
Zitat von Luca Olivetti <[EMAIL PROTECTED]>: > En/na Mattias Gärtner ha escrit: > > I'm writing a unit to simplify parallel methods/procedures. > > > > For example: > > DoParallel(@AMethod,StartIndex,EndIndex,Data); > > > > The AMethod is executed with several threads in parallel. > > > > What s

Re: [fpc-devel] Exceptions in threads

2008-12-11 Thread Mattias Gärtner
Zitat von Florian Klaempfl <[EMAIL PROTECTED]>: > Mattias Gärtner schrieb: > > I'm writing a unit to simplify parallel methods/procedures. > > > > For example: > > DoParallel(@AMethod,StartIndex,EndIndex,Data); > > > > The AMethod is executed with several threads in parallel. > > > > What should

Re: [fpc-devel] Exceptions in threads

2008-12-10 Thread Jonas Maebe
On 10 Dec 2008, at 22:12, Luca Olivetti wrote: En/na Mattias Gärtner ha escrit: I'm writing a unit to simplify parallel methods/procedures. For example: DoParallel(@AMethod,StartIndex,EndIndex,Data); The AMethod is executed with several threads in parallel. What should happen when an exceptio

Re: [fpc-devel] Exceptions in threads

2008-12-10 Thread Luca Olivetti
En/na Mattias Gärtner ha escrit: I'm writing a unit to simplify parallel methods/procedures. For example: DoParallel(@AMethod,StartIndex,EndIndex,Data); The AMethod is executed with several threads in parallel. What should happen when an exception occurs? AFAIK any unhandled exception in a

Re: [fpc-devel] Exceptions in threads

2008-12-10 Thread Florian Klaempfl
Mattias Gärtner schrieb: > I'm writing a unit to simplify parallel methods/procedures. > > For example: > DoParallel(@AMethod,StartIndex,EndIndex,Data); > > The AMethod is executed with several threads in parallel. > > What should happen when an exception occurs? > It would be nice if the exce

[fpc-devel] Exceptions in threads

2008-12-10 Thread Mattias Gärtner
I'm writing a unit to simplify parallel methods/procedures. For example: DoParallel(@AMethod,StartIndex,EndIndex,Data); The AMethod is executed with several threads in parallel. What should happen when an exception occurs? It would be nice if the exception can be transfered to the main thread.