Announcement

Collapse
No announcement yet.

running 6+ functions simultaniously

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • running 6+ functions simultaniously

    Hiya folks.
    My Boss has wrote a server app in Pascal (about 12 years ago)
    and I recently suggested to him that it was time we moved into
    the 21st century. He replied with a copy of Delphi 4 and said
    " here ya go, do it " I sat there looking at it for a while and then realized
    it's not that much different to PowerBASIC. I wrote the dialer
    and data transfer code in Delphi but now I want to make it
    smaller and I HAVE to run at least 6 functions at the same time.
    Basically.. is this multi threading or multi tasking ??
    Please !


  • #2
    To quote from Petzold...

    "Multitasking is the ability of the operating system to run multiple programs concurrently. Basically the operating system uses a hardware clock to allocate "time slices" for each currently running process."

    "Multithreading is the ability for a program to multitask within itself. The program can split itself into seperate "threads" of execution that also seem to run concurrently.

    So to answer your question, you want to use multithreading. From the above definition you'll notice that on a single processor machine you cant actually execute anything (either multiple programs or multiple threads) simultaneously. It only appears that everything is running simultaneously when in actuality, the OS is constantly switching back and forth between the various processes and threads within processes.

    By the way, if you've never dealt with multithreading, you should definetly pick up a book which talks about this. I recommend "Advanced Windows" by Jeffrey Richter. It has several chapters which discuss threads.
    -Mike



    [This message has been edited by Mike Joseph (edited August 18, 2000).]

    Comment

    Working...
    X