Professional Web Applications Themes

MPWaitForEvent never times out on Panther - Mac Programming

I recently upgraded my system from Jaguar (10.2.8) to Panther (10.3.2). I installed the new development tools and now a multithreaded program I wrote and ran fine on Jaguar does not run on Panther. I'm wondering if I have a ed up installation. Can someone please try building the following simple program with Xcode on Panther and see if it will work for them. #include <Carbon/Carbon.h> #include <iostream> OSStatus ThreadRoutine ( void* pContext ) { MPEventID* pEvent = reinterpret_cast<MPEventID*>(pContext); using std::clog; if(kMPTimeoutErr == ::MPWaitForEvent(*pEvent, 0, kDurationMillisecond * 2500)){ clog << "Failed to receive the event"; } else{ clog << "Successfully ...

  1. #1

    Default MPWaitForEvent never times out on Panther

    I recently upgraded my system from Jaguar (10.2.8) to Panther
    (10.3.2). I installed the new development tools and now a
    multithreaded program I wrote and ran fine on Jaguar does not run on
    Panther.

    I'm wondering if I have a ed up installation.

    Can someone please try building the following simple program with
    Xcode on Panther and see if it will work for them.

    #include <Carbon/Carbon.h>
    #include <iostream>

    OSStatus ThreadRoutine
    (
    void* pContext
    )
    {
    MPEventID* pEvent = reinterpret_cast<MPEventID*>(pContext);

    using std::clog;
    if(kMPTimeoutErr == ::MPWaitForEvent(*pEvent, 0, kDurationMillisecond
    * 2500)){
    clog << "Failed to receive the event";
    }
    else{
    clog << "Successfully received the event.\n";
    }

    return noErr;
    }

    int main()
    {
    MPEventID event;
    ::MPCreateEvent(&event);

    MPQueueID queue;
    ::MPCreateQueue(&queue);

    MPTaskID taskID;
    ::MPCreateTask(ThreadRoutine, &event, 0, queue, NULL, NULL, 0,
    &taskID);

    AbsoluteTime waitTime =
    ::AddDurationToAbsolute(1000 * kDurationMillisecond, ::UpTime());
    ::MPDelayUntil(&waitTime);

    ::MPSetEvent(event, 0);

    ::MPWaitOnQueue(queue, NULL, NULL, NULL, kDurationForever);

    ::MPDeleteQueue(queue);
    ::MPDeleteEvent(event);

    return 0;
    }

    You will need to link into the Carbon framework to build it
    When I run it the call to MPWaitForEvent never returns even though I
    specified a timeout value, and I get no output from the program.
    Tron Guest

  2. #2

    Default Re: MPWaitForEvent never times out on Panther

    In article <google.com>,
    net (Tron Thomas) wrote:
     

    I'd be milling to try if you created the project and code, stuffed it
    up, and gave me a place to download it.
    Sean Guest

  3. #3

    Default Re: MPWaitForEvent never times out on Panther

    In article <google.com>,
    net (Tron Thomas) wrote:
     
     

    This appears to reproduce for me on 10.3.2. I'd suggest filing a bug
    with your code included at <http://bugreport.apple.com/>.

    -Eric

    --
    Eric Albert stanford.edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

  4. #4

    Default Re: MPWaitForEvent never times out on Panther

    Eric Albert <stanford.edu> wrote in message news:<stanford.edu>... 

    Yes, I tried it on two other machines, one running Panther and one
    running Jaguar. The Jaguar machine timed out waiting of the event;
    the Panther machine hung. I have already informed Apple about the
    bug.
    Tron Guest

Similar Threads

  1. CF7 on Mac OS X Panther
    By jeby in forum Coldfusion - Getting Started
    Replies: 0
    Last Post: June 9th, 02:34 AM
  2. AI 10.0.3 on G5 Panther
    By overprintboy@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 2
    Last Post: May 14th, 09:14 AM
  3. 7.1 and Panther
    By spjones@adobeforums.com in forum Adobe Photoshop Mac CS, CS2 & CS3
    Replies: 3
    Last Post: May 5th, 06:49 PM
  4. Dir CDs in Panther
    By Michael Windle in forum Macromedia Director Basics
    Replies: 0
    Last Post: January 12th, 06:00 AM
  5. Panther and TB2 Pro?
    By Andy in forum Mac Networking
    Replies: 7
    Last Post: November 9th, 07:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139