• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Threading...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Threading...


  • Subject: Threading...
  • From: "Brian O'Brien" <email@hidden>
  • Date: Wed, 9 Feb 2005 16:06:05 -0700

I have the following:

in dicomSCP.h

@interface dicomSCP : NSObject {

}

+ (void) ThreadMethod:(id)anObject;
- (void) InstanceThreadMethod:(id)anObject;

@end

in dicomSCP.mm

@implementation dicomSCP

+ (id)anObject
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// Do thread work here
[pool release];
}
- (id)anObject
{
}
@end


in main.mm

#include "dicomSCP.h"

int main(int argc, char *argv[])
{
[NSThread detachNewThreadSelector:@selector(ThreadMethod:) toTarget:[dicomSCP class] withObject:nil];
return NSApplicationMain(argc, (const char **) argv);
}


My questions are:

1) Is there a better place to start the thread?
2) Where is the instance of my class dicomSCP? Without one I don't know how to call 'thread safe' member functions.
3) I don't get the + / - in front of the methods.. Instance vs. Class?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Threading...
      • From: Kevin Ballard <email@hidden>
  • Prev by Date: Re: Fade out the window content
  • Next by Date: Re: Folder Icons In Sidebar?
  • Previous by thread: Re: Folder Icons In Sidebar?
  • Next by thread: Re: Threading...
  • Index(es):
    • Date
    • Thread