Re: [fpc-pascal] Undocumented optimizations???

2019-02-10 Thread denisgolovan
Anybody home? :)

-- 
Regards,
Denis Golovan
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Question: Is there a global callback, when a thread gets terminated?

2019-02-10 Thread Martin Frb

On 08/02/2019 10:09, Michael Schnell wrote:

There are no "siblings".

The use case here would be LazLogger. User code can call a function "Debugln"
this calls a method on a global object.
The object provides storage for log-level (by name), and indentation, and
others.
  
So the logger software could check a Thradvar (I *suppose* they are initiated with Zero) and create or use an internal object the self of which is stored in the Threadvar and with that having an instance for any thread that calls "Debugln"


Yes, but how do I get notified, when the thread is gone, and I can free 
the memory (of the object that was created)?

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Question: Is there a global callback, when a thread gets terminated?

2019-02-10 Thread Michael Schnell
> There are no "siblings".
> 
> The use case here would be LazLogger. User code can call a function "Debugln"
> this calls a method on a global object.
> The object provides storage for log-level (by name), and indentation, and
> others.
 
So the logger software could check a Thradvar (I *suppose* they are initiated 
with Zero) and create or use an internal object the self of which is stored in 
the Threadvar and with that having an instance for any thread that calls 
"Debugln"

-Michael

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal