You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "jxnu-liguobin (via GitHub)" <gi...@apache.org> on 2023/09/25 07:25:27 UTC

[GitHub] [incubator-pekko] jxnu-liguobin commented on a diff in pull request #616: =str Switch the type parameter order of UnfoldResourceSourceAsync

jxnu-liguobin commented on code in PR #616:
URL: https://github.com/apache/incubator-pekko/pull/616#discussion_r1335487002


##########
stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:
##########
@@ -961,11 +961,13 @@ object Source {
    * @param read - function that reads data from opened resource. It is called each time backpressure signal
    *             is received. Stream calls close and completes when `Future` from read function returns None.
    * @param close - function that closes resource
+   * @tparam T the element type
+   * @tparam R the resource type
    */
-  def unfoldResourceAsync[T, S](
-      create: () => Future[S],
-      read: (S) => Future[Option[T]],
-      close: (S) => Future[Done]): Source[T, NotUsed] =
+  def unfoldResourceAsync[T, R](
+      create: () => Future[R],
+      read: (R) => Future[Option[T]],

Review Comment:
   ```suggestion
         read: R => Future[Option[T]],
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org