You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2024/03/28 17:41:05 UTC

[I] Feature request: Add `Source.multi` method [pekko]

He-Pin opened a new issue, #1238:
URL: https://github.com/apache/pekko/issues/1238

   Motivation:
   
   There are many `Source.from(Arrays.asList(...))` in Java, I think we can add something like `Source.multi(...)` which work as the `Flux.Just(T ...t)`.
   
   Result:
   Replace `Source.from(Arrays.asList(1,2,3))` to `Source.multi(1,2,3))`


-- 
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.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


Re: [I] Feature request: Add `Source.multi` method [pekko]

Posted by "laglangyue (via GitHub)" <gi...@apache.org>.
laglangyue commented on issue #1238:
URL: https://github.com/apache/pekko/issues/1238#issuecomment-2027269240

   > How about `Source.elements(T ...t)` ? `of` will cause real trouble at Work when you need to cooperate with your work-mate, trust me.
   
   okey


-- 
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


Re: [I] Feature request: Add `Source.multi` method [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on issue #1238:
URL: https://github.com/apache/pekko/issues/1238#issuecomment-2026673595

   I'm not sure about this, `Source.from(T ...t) ` may cause user to wonder does the stream emits ` T1, T2, T3 ...` or  just a `[T1, T2,T3 ...]` array element. I think that's why there is a `Source.single` for explicit.
   
   So:
   - `Source.single` for a single element.
   - `Source.multi` for many elements


-- 
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


Re: [I] Feature request: Add `Source.multi` method [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on issue #1238:
URL: https://github.com/apache/pekko/issues/1238#issuecomment-2027180481

   How about `Source.elements(T ...t)` ? `of` will cause real trouble at Work when you need to cooperate with your work-mate, trust me.


-- 
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


Re: [I] Feature request: Add `Source.multi` method [pekko]

Posted by "Roiocam (via GitHub)" <gi...@apache.org>.
Roiocam commented on issue #1238:
URL: https://github.com/apache/pekko/issues/1238#issuecomment-2026699677

   Fair to me. It will be easier to use on Java.


-- 
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


Re: [I] Feature request: Add `Source.multi` method [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on issue #1238:
URL: https://github.com/apache/pekko/issues/1238#issuecomment-2039416150

   I just checked https://github.com/smallrye/smallrye-mutiny, which is using `item(...)` 


-- 
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


Re: [I] Feature request: Add `Source.multi` method [pekko]

Posted by "laglangyue (via GitHub)" <gi...@apache.org>.
laglangyue commented on issue #1238:
URL: https://github.com/apache/pekko/issues/1238#issuecomment-2026746937

   I vote +1 to `Source.of`, I like to use `Source.of(1)` and `Source.of(1, 2, 3)`
   `Source.multi(1)` equals  `Source.single(1)` , so `Source.multi(1)` just emit one, it conveyed an erroneous semantics


-- 
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


Re: [I] Feature request: Add `Source.multi` method [pekko]

Posted by "Roiocam (via GitHub)" <gi...@apache.org>.
Roiocam commented on issue #1238:
URL: https://github.com/apache/pekko/issues/1238#issuecomment-2026450208

   I would prefer overloading `Source.from(T...)`, or like Java Stream API has `Source.of(T)` and `Source.of(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


Re: [I] Feature request: Add `Source.multi` method [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on issue #1238:
URL: https://github.com/apache/pekko/issues/1238#issuecomment-2027180207

   How about `Source.elements(T ...t)` ? `of` will cause real trouble at Work when you need to cooperate with your work-mate, trust me.


-- 
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