title: difference between dispatcher and execution context in akka
body: <p>I have following actors:</p>
  
  <pre><code>val actor1 = context.actorOf(SorterActor.build
      .withDispatcher("akka.actor.custom-dispatcher"), name = "actor_child1")
  val actor2 = context.actorOf(SorterActor.build
      .withDispatcher("akka.actor.custom-dispatcher"), name = "actor_child2")
  </code></pre>
  
  <p>and execution context</p>
  
  <pre><code>implicit val ec: ExecutionContext = context.system.dispatchers.lookup("akka.actor.custom-dispatcher")
  </code></pre>
  
  <p>Thing what I don't understand is what is difference between saying which dispatcher to use with <code>withDispatcher</code> fn on actor, and specifying execution context which point to the same dispatcher. What will happen if execution context is pointing to different dispatcher than one defined with <code>withDispatcher</code> function?</p>
  
  <p>Thank you.</p>