Professional Web Applications Themes

Advice on threads - Mac OS 9 - Mac Programming

What's the best approach for writing a multi-threaded app for Mac OS 9? What I have in mind is a main thread that collects some information and a separate thread to wake up and save the info to file every 30 seconds. I'm currently using CodeWarrior 8, but don't see much in the way of examples. The only thread related info I see in the doentation set is windows only. Thanks in advance, Mick....

  1. #1

    Default Advice on threads - Mac OS 9

    What's the best approach for writing a multi-threaded app for Mac OS 9?

    What I have in mind is a main thread that collects some information and
    a separate thread to wake up and save the info to file every 30 seconds.

    I'm currently using CodeWarrior 8, but don't see much in the way of
    examples. The only thread related info I see in the doentation set
    is windows only.

    Thanks in advance,
    Mick.

    Mick Guest

  2. #2

    Default Re: Advice on threads - Mac OS 9

    In article <3F01D4D7.6070303hotmail.com>,
    Mick <mickster00hotmail.com> wrote:
    > What's the best approach for writing a multi-threaded app for Mac OS 9?
    >
    > I'm currently using CodeWarrior 8, but don't see much in the way of
    > examples. The only thread related info I see in the doentation set
    > is windows only.
    Here is something I wrote 4 years ago:

    <http://groups.google.com/groups?selm=oster-1710992329040001%40adsl-63-192-132-81.dsl.snfc21.pacbell.net>
    David Phillip Oster Guest

  3. #3

    Default Re: Advice on threads - Mac OS 9

    On Tue, 1 Jul 2003, David Phillip Oster wrote:
    > In article <3F01D4D7.6070303hotmail.com>,
    > Mick <mickster00hotmail.com> wrote:
    >
    > > What's the best approach for writing a multi-threaded app for Mac OS 9?
    > >
    > > I'm currently using CodeWarrior 8, but don't see much in the way of
    > > examples. The only thread related info I see in the doentation set
    > > is windows only.
    >
    > Here is something I wrote 4 years ago:
    >
    > <http://groups.google.com/groups?selm=oster-1710992329040001%40adsl-63-192-132-81.dsl.snfc21.pacbell.net>

    I'll add that MP (preemptive threads) are also an option.
    There are restrictions on what calls you can make from such a thread and
    you need to think carefully about what you do to avoid race conditions and
    such. There is sample code on the developer web side that will allow to
    use open transport from an mp thread. (search for otmp).
    You can send carbon events from an mp thread which is in general much more
    fun than using queues/semaphores.

    Doentation on both kinds of threads can be found on the developer web
    site.

    Fred

    Frederick Cheung Guest

Similar Threads

  1. threads in perl
    By Igor Ryaboy in forum PERL Beginners
    Replies: 24
    Last Post: March 3rd, 06:59 AM
  2. Threads troubles
    By Stefan Weiss in forum PERL Miscellaneous
    Replies: 3
    Last Post: September 9th, 11:05 AM
  3. Sockets and threads
    By Mark J. Reed in forum Ruby
    Replies: 1
    Last Post: August 26th, 07:38 AM
  4. Using threads to obtain a value
    By Zachary P. Landau in forum Ruby
    Replies: 2
    Last Post: July 17th, 01:00 AM
  5. Max worker threads
    By Vinodk in forum Microsoft SQL / MS SQL Server
    Replies: 8
    Last Post: July 3rd, 06:44 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