Monday, March 10, 2014

API Design, the Main Thread, and Queues

Brent Simmons:

I start with the ideal assumption that everything will run on the main thread.

Once I find that a queue is needed, I keep that queue private to the object that uses it. That object’s public API is main-thread-only, even though internally it uses a queue.

Sounds like a good general rule to me.

Comments RSS · Twitter

Leave a Comment