quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

MotionInMotion Episode 15 - Grand Central Dispatch

Grand Central Dispatch - MotionInMotion

画像をバックグラウンドで順にロードする

  • Grand Central Dispatch
    • background task
  • singleton
    • ImageList
      • def self.sharedInstance
        • Dispatch.once { @shared = self.new } ; @shared instead of @shared ||= self.new
  • ImageController
    • viewDidAppear
      • urls = ImageList.sharedInstance.images
      • q = Dispatch::Queue.new('tv.motioninmotion.ImageLoading')
      • q.async do
        • Dispatch::Queue.concurrent(:default).apply(urls.count) do |index|
          • priority :default, :low, :high
        • 次の部分から後は完了するまでブロックされる
          • Dispatch::Queue.main.sync do
  • q.syncとq.asyncを使い分け
  • Receptionist Pattern Concepts in Objective-C Programming: Receptionist Pattern
  • lorempixel - placeholder images for every case