Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-09

Pseudo-Thread

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jens Rosenthal

Hi Everyone,

hope you can help me with my question...

I'd like to have several instances of my program running at the same time, working apart from one another.

The problem is, every instance takes 99.8 % CPU time, so only the first instance is running, then the second, and so on.
In Java I would define the program as thread and let the thread sleep at certain points in execution, so that the other instances can take their time.

any ideas how I could handle this behavior with fpc?

many thanx in advance,

Jens

Gabor DEAK JAHN
to Jens Rosenthal

At 9/20/01 10:19 PM, you wrote:

Jens,

The problem is, every instance takes 99.8 % CPU time, so only the first instance is running, then the second, and so on.

You should at least mention which platform you try this on... :-))

Bye,
Gábor

------------------------------------------------------------------- Gabor DEAK JAHN -- Budapest, Hungary.
E-mail:

Lee, John

sleep(n) (n is in msec) in win32, special delay functions (I can send you code) under dos under win9x, dunno about linux, unix, m68k...BTW it's always a good idea to say which o/s you are running on - remember fpc runs on all sorts of platforms & o/ss... J

Earlier message 28 lines
-----Original Message----- From: Jens Rosenthal Sent: Thursday, September 20, 2001 09:20 To: Free Pascal Mailinglist Subject: [fpc-pascal]Pseudo-Thread Hi Everyone, hope you can help me with my question... I'd like to have several instances of my program running at the same time, working apart from one another. The problem is, every instance takes 99.8 % CPU time, so only the first instance is running, then the second, and so on. In Java I would define the program as thread and let the thread sleep at certain points in execution, so that the other instances can take their time. any ideas how I could handle this behavior with fpc? many thanx in advance, Jens