Task manager in Pascal

problem with alerts, threads maybe needed

Page 1 of 1

0 Replies - 483 Views - Last Post: 17 December 2010 - 11:07 AM Rate Topic: -----

#1 ScRyX   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 11-November 09

Task manager in Pascal

Posted 17 December 2010 - 11:07 AM

Hi,
so I'm writing a simple task manager, but now I have encountered a problem I can't solve.
What I already have is a simple console interface for inserting information about a new task, it is saved to a text file, then the program reads events from this text file, puts them into a heap, so that I can get the closest event, and when the time comes, do a simple beep with sound() command. The problem is, I can't check for time every second or so in the main program, and what is more, the user still has to be able to add new tasks, browse tasks etc.. I originally wanted to use the Exec() function, but I found out the main program waits for the executed program to finish and then continues...I need two programs running simultaneously...and I don't know how to do that. I checked threading in freepascal documentation, but I'm totally confused. Are threads the only way? If so, could someone explain to me how to use them?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1