Observable head should take implicit ExecutionContext passed by consumer

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Works as Designed
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Scala
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Right now, Observable head hard codes an ExecutionContext. It would be preferable if library consumers could pass in an ExecutionContext of their choosing:

        def head()(implicit ec: ExecutionContext): Future[T] = {
          headOption().map {
            case Some(result) => result
            case None         => null.asInstanceOf[T] // scalastyle:ignore null
          }
        }
      

              Assignee:
              Ross Lawley
              Reporter:
              Scott Rice
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: