Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1.  
  2. - (id)init
  3. {
  4. fprintf(stderr, "init\n");
  5. self = [super init];
  6. if (self) {
  7. fprintf(stderr, "setting the lock\n");
  8. [self setLock:[[[NSConditionLock alloc] autorelease] initWithCondition:0]];
  9. [self setEventQ:[[[NSMutableArray alloc] autorelease] initWithCapacity:10]];
  10. }
  11.  
  12. return self;
  13. }
  14.  
  15. - (id)initWithCoder:(NSCoder *)aDecoder
  16. {
  17. fprintf(stderr, "initWithCoder\n");
  18. self = [super initWithCoder:aDecoder];
  19. if (self) {
  20. fprintf(stderr, "setting the lock\n");
  21. [self setLock:[[[NSConditionLock alloc] autorelease] initWithCondition:0]];
  22. [self setEventQ:[[[NSMutableArray alloc] autorelease] initWithCapacity:10]];
  23. }
  24.  
  25. return self;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement