Hello Martin.
Wow.
OK, I will add a new line in define.inc of uos -->
{.$DEFINE mse} // when using a mse project uncomment for building using mse
thread and timer
... and adapt uos code for that new define.
Write you later.
Fre;D
________________________________
De : Martin Schreiber <mse00...@gmail.com>
Envoyé : dimanche 16 juillet 2017 07:32
À : mseide-msegui-talk@lists.sourceforge.net
Objet : Re: [MSEide-MSEgui-talk] Some question about MSE thread...
On Sunday 16 July 2017 00:04:48 Fred van Stappen wrote:
> Hello Martin
>
> Some question about MSE threads (tthreadcomp?)...
>
> Mainly how to convert fpc TThread into mse tthreadcomp...
>
> How do you convert this in mse code (+ some tips are welcome)?
>
>
> TMSEthread = class(TThread) ----> TMSEthread = class(tthreadcomp) ----> ok
> ?
>
tthreadcomp is a container of teventthread which can be placed in a form.
In order to replace a FPC TThread one probably would use tmsethread or one of
its descendants (tmutexthread -> tsemthread -> teventthread). tmutexthread
has a mutex, tsemthread a semaphore and teventthread an event queue.
> constructor TMSEthread.Create(CreateSuspended: boolean;
> const StackSize: SizeUInt) ----> ?
>
constructor create(const athreadproc: threadprocty;
const afreeonterminate: boolean = false;
const astacksizekb: integer = 0); overload; virtual;
> destructor Destroy; override ----> ?
>
destructor destroy; override;
> procedure Execute; override ----> ?
>
function execute(thread: tmsethread): integer; virtual;
> procedure DoTerminate; override ----> ?
>
Does not exist, there is tthreadcomp.onterminate and tthreadcomp.onterminated.
> ...
>
> TMSEthread.Start ----> ?
>
tmsethread starts automatically, there is tthreadcomp.active.
> TMSEthread.Queue ----> ?
>
application.postevent(). Often application.lock()/unlock() is more convenient.
> TMSEthread.FreeOnTerminate := true ----> ?
>
tmsethread.freeonterminate:= true;
> TMSEthread.Priority := tpTimeCritical ----> ?
Not implemented.
> ...
>
> About using MSEThreads outside a MSE project...
> Is it possible?
Not easy, it needs the MSE-infrastructure.
Martin
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mseide-msegui-talk Info Page -
SourceForge<https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk>
lists.sourceforge.net
mseide-msegui-talk -- General list for MSEide+MSEgui About mseide-msegui-talk
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk