Thread: Parallel execution

  1. #1
    Back after 2 years Panopticon's Avatar
    Join Date
    Dec 2002

    Parallel execution

    Does anyone know how to create another line of execution? what I mean by that is given a movie trailer that pauses when the user presses <p>. To do that, the closest method to the actually solution would be something like this:
    if(ch=='p') movie.stop();
    but that is obviously wrong. Does anyone know how to set up another execution path so that the movie or whatever executes until the moment the user presses a key or some external event happens?
    I AM WINNER!!!1!111oneoneomne

  2. #2
    Registered User Cela's Avatar
    Join Date
    Jan 2003
    You need to either use threads or fork a new process, depending on what your needs are and what system you're on.

  3. #3
    Registered User Diamonds's Avatar
    Join Date
    Oct 2002

    dont use cin

    don't use cin

    instead you'll need the program to read the keyboard buffer for 'p'

    if it is pressed, paused
    if not, do nothing

    put that in the playmovie() function

    *might require DirectX*
    unless you can find a library that read keyboard buffer other than directx

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Parallel Port to USB controller and outb()
    By coletek in forum Linux Programming
    Replies: 1
    Last Post: 06-05-2009, 06:57 AM
  2. Execution Time - Rijandael encryption
    By gamer4life687 in forum C++ Programming
    Replies: 5
    Last Post: 09-20-2008, 09:25 PM
  3. Replies: 0
    Last Post: 10-06-2007, 01:25 PM
  4. Serial to Parallel
    By ssharish2005 in forum Tech Board
    Replies: 11
    Last Post: 09-10-2007, 01:11 PM
  5. Segmentation Fault - Trying to access parallel port
    By tvsinesperanto in forum C Programming
    Replies: 3
    Last Post: 05-24-2006, 03:28 AM