6

I can't seem to find out what the "t" in dispatch_queue_t stands for from Apple's GCD documentation.

At first I thought it was "thread" but after reading this question I think it means typedef. If that is the case, what is dispatch_queue_t a typedef of?

Community
  • 1
  • 1
snowflakekiller
  • 3,428
  • 6
  • 27
  • 45
  • 2
    t = type ... check also http://stackoverflow.com/questions/1391447/what-does-the-postfix-t-stand-for-in-c – Aziz Dec 25 '11 at 16:00

1 Answers1

9

It stands for "type". If the docs don't specify what dispatch_queue_t is a typedef for, then it's an opaque type: you're not supposed to know, because it's an implementation detail (not part of the API spec).

Fred Foo
  • 355,277
  • 75
  • 744
  • 836
  • 2
    ah ok, not knowing small details like what a letter stands for really eats at me, but as long as I know I'm not supposed to know I feel better. no such thing as a silly question right :) – snowflakekiller Dec 25 '11 at 16:15
  • @Karuna-bdc, there's a reason for not knowing what's in a `dispatch_queue_t`: new versions of the library you're using might change its implementation. If your software is decoupled from the `dispatch_queue_t` definition, it won't break when that happens. – Fred Foo Dec 25 '11 at 16:17
  • 2
    the _t for type has been around in the C programming language for as long as I've known/worked with C. It's a pretty common thing. If you look in the low level socket headers, or even stdio.h, you'll see these custom types with a _t all over the place. – casademora Jan 09 '12 at 07:27
  • That's answer. However, according to the name of the types and methods, they are really not good APIs – Henry Jul 03 '12 at 06:18