using Crt Functions inside a thread.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

using Crt Functions inside a thread.

josepascual (almudi)
Hi,

I have a little program working with Crt units without problem. I have
change the print way form, I have pushing Crt Commands inen Fifo (GotoXY, ClrScr, ClrEol, Write,...) and I have created a Thread
class to pop this commands to execute it.
Problem seems to be cursor position in tty which is not working okey
perhaps for using threads? Is any funtion to syncronizing tty each time is
writing or changing cursor position?
version of compiler a compiling output,
====================================================
Free Pascal Compiler version 2.0.0 [2005/05/15] for i386 Copyright (c)
1993-2005 by Florian Klaempfl Target OS: Linux for i386 Compiling test.dpr
Linking test_386 25 Lines compiled, 0.4 sec====================================================

I have attached an example in order to test it,

tia!

best regards.



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

ApilarCrt.pas (7K) Download Attachment
test.dpr (459 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: using Crt Functions inside a thread.

Peter Vreman
> Hi,
>
> I have a little program working with Crt units without problem. I have
> change the print way form, I have pushing Crt Commands inen Fifo (GotoXY,
> ClrScr, ClrEol, Write,...) and I have created a Thread
> class to pop this commands to execute it.
> Problem seems to be cursor position in tty which is not working okey
> perhaps for using threads? Is any funtion to syncronizing tty each time is
> writing or changing cursor position?
> version of compiler a compiling output,
> ====================================================
> Free Pascal Compiler version 2.0.0 [2005/05/15] for i386 Copyright (c)
> 1993-2005 by Florian Klaempfl Target OS: Linux for i386 Compiling test.dpr
> Linking test_386 25 Lines compiled, 0.4
> sec====================================================
>
> I have attached an example in order to test it,

The crt unit is for compatibility with tp only. It is not made for
multithreading. There are no plans to solve this.



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

RE: using Crt Functions inside a thread.

josepascual (almudi)
In reply to this post by josepascual (almudi)
How Can I wait for one crt function finish? (gotoxy, write, ...)

I could use a semaphore or critical section to protect mulitreading ,
couldn't it?
tia

regards



> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre de
> Peter Vreman
> Enviado el: martes, 21 de marzo de 2006 14:55
> Para: FPC-Pascal users discussions
> Asunto: Re: [fpc-pascal] using Crt Functions inside a thread.
>
>
> > Hi,
> >
> > I have a little program working with Crt units without
> problem. I have
> > change the print way form, I have pushing Crt Commands inen Fifo
> > (GotoXY, ClrScr, ClrEol, Write,...) and I have created a
> Thread class
> > to pop this commands to execute it. Problem seems to be cursor
> > position in tty which is not working okey perhaps for using
> threads?
> > Is any funtion to syncronizing tty each time is writing or changing
> > cursor position? version of compiler a compiling output,
> > ====================================================
> > Free Pascal Compiler version 2.0.0 [2005/05/15] for i386
> Copyright (c)
> > 1993-2005 by Florian Klaempfl Target OS: Linux for i386
> Compiling test.dpr
> > Linking test_386 25 Lines compiled, 0.4
> > sec====================================================
> >
> > I have attached an example in order to test it,
>
> The crt unit is for compatibility with tp only. It is not
> made for multithreading. There are no plans to solve this.
>
>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fp> c-pascal
>
>
> __________ InformaciĆ³n de NOD32, revisiĆ³n 1.1452
> (20060320) __________
>
> Este mensaje ha sido analizado con  NOD32 antivirus system
http://www.nod32.com




_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal