Telegram_2024-09-05T20

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2024 > 09 > 05 >

Telegram_2024-09-05T20

Telegram link

 

2024-09-05T20:40:00

 

Yes, you mean tasks and anonymous threads? Sure. there is no problem or incompatibilities.

 

IntraWeb itself has classes to help with the threads. Look in IW.Common.Threads.pas

 


 

Telegram link

 

2024-09-05T20:41:10

 

For instance, TIWThreadBase

 


 

Telegram link

 

2024-09-05T20:58:43

 

TIWThreadBase has 2 methods to run your own stuff in threads:

 

type: pre ///  Executes an anonymous method in a thread

 

/// Anonymous method to be executed. The method parameter is the own thread which executes it

 

/// Name of the thread

 

/// Any data that must be passed to the AMethod, as a pointer parameter. If AData is not provided, the thread itself is passed

 

class procedure ExecInThread(AMethod: TIWThreadProc; const AThreadName: string = ''; AData: Pointer = nil); overload;

 

///  Executes an anonymous method in a thread. Do *not* set ASynchronize to True in an IntraWeb application

 

/// Anonymous method to be executed. The method parameter is the own thread which executes it

 

class procedure ExecInThread(AMethod: TIWThreadProc; const AThreadName: string; AOnTerminate: TIWThreadProc; ASynchronize: Boolean; AData: Pointer = nil); overload; language: