# Role of \`ZIO.executor\` in the http4s + ZIO Adopt Tapir template

**URL:** <https://softwaremill.community/t/role-of-zio-executor-in-the-http4s-zio-adopt-tapir-template/211>\
**Category:** tapir\
**Created:** [May 25, 2023, 6:04pm UTC](https://softwaremill.community/t/role-of-zio-executor-in-the-http4s-zio-adopt-tapir-template/211 "2023-05-25T18:04:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![beneyal](https://dub1.discourse-cdn.com/flex005/user_avatar/softwaremill.community/beneyal/32/57_2.png) [@beneyal](https://softwaremill.community/u/beneyal)\
**Post date:** [May 25, 2023, 6:04pm UTC](https://softwaremill.community/t/role-of-zio-executor-in-the-http4s-zio-adopt-tapir-template/211/1 "2023-05-25T18:04:56Z")

</div>

Hello 👋

I’m not sure if it’s a “bug” in the template or am I misunderstanding something. Given this code:

```plaintext
    ZIO.executor.flatMap { _ =>
      EmberServerBuilder
        .default[Task]
        .withHost(Host.fromString("localhost").get)
        .withPort(port)
        .withHttpApp(Router("/" -> routes).orNotFound)
        .build
        .use { server =>
          for {
            _ <- Console.printLine(s"Server started at http://localhost:${server.address.getPort}. Press ENTER key to exit.")
            _ <- Console.readLine
          } yield ()
        }
    }

```

Do we really need the `ZIO.executor`? I know we needed it for the Blaze server (for `.withExecutionContext`), but Ember doesn’t seem to use it. Is the fact that the executor is “in scope” doing somerthing?

Thanks!

---

<div class="post-metadata">

**Author:** ![adamw](https://dub1.discourse-cdn.com/flex005/user_avatar/softwaremill.community/adamw/32/28_2.png) [@adamw](https://softwaremill.community/u/adamw)\
**Post date:** [May 25, 2023, 8:35pm UTC](https://softwaremill.community/t/role-of-zio-executor-in-the-http4s-zio-adopt-tapir-template/211/2 "2023-05-25T20:35:40Z")

</div>

Yeah maybe that’s a leftover from the Blaze → Ember migration and we don’t need that … we’ll check 🙂
