Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dariusrobson
Copy link
Contributor

@dariusrobson dariusrobson commented Jun 30, 2019

I thought I would create a WIP PR to make sure I am in the right ball park.

Places where I think I may need to make changes/improvements:

  • Creation of Queue only where needed for effectAsyncMaybe and effectAsyncInterrupt
  • Use of Runtime and Propagation of errors
  • Use of canceler for finalization in effectAsyncInterrupt + tests

Resolves #1040

@dariusrobson
Copy link
Contributor Author

Hi @iravid I have created a WIP PR for ZStream#effectAsync and variants to see if I am in the right ball park :-)

@iravid
Copy link
Member

iravid commented Jul 1, 2019

@dariusrobson this is definitely on the right track! Looking great. I’ll try to review later tonight. Thanks for working on this!

Copy link
Member

@iravid iravid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work. This is a really useful set of constructors for importing effects. left a few minor comments inline.

@dariusrobson
Copy link
Contributor Author

Great! Thank you for your comments @iravid. I have made some changes, let me know your thoughts :-)

@iravid
Copy link
Member

iravid commented Jul 4, 2019

@dariusrobson Looks great. I've no more comments on the implementation, nice work! Can you look into the failing tests? Let me know if you need help hardening them.

@dariusrobson
Copy link
Contributor Author

Thanks @iravid , I have put in a fix for the effectAsyncM test. The test_211_jdk8_jvm is failing for effectAsyncInterruptLeft and also for foreachParN - both for interruption (not sure if a coincidence). Any ideas on the cause?

@dariusrobson dariusrobson changed the title WIP - ZStream effectAsync and variants ZStream effectAsync and variants Jul 19, 2019
@iravid
Copy link
Member

iravid commented Jul 19, 2019

Looks good! @dariusrobson can you please rebase on master?

@iravid
Copy link
Member

iravid commented Jul 19, 2019

Oh, and there's one last thing to be addressed: after you rebase/merge master, you'll see that we now have two objects: ZStream and Stream. Could you add the forwarding constructors to Stream as well?

@dariusrobson
Copy link
Contributor Author

dariusrobson commented Jul 19, 2019

Cool. I have rebased and added the forwarding constructors to Stream.
Let me know if there is anything else to adjust with the rebase @iravid

@dariusrobson
Copy link
Contributor Author

I will look into the failing test.

@iravid
Copy link
Member

iravid commented Jul 19, 2019

Awesome πŸŽ‰ RTSSpec is known to be flaky, so this is good to go!

@iravid iravid merged commit bba4e60 into zio:master Jul 19, 2019
@iravid
Copy link
Member

iravid commented Jul 19, 2019

Thank you so much @dariusrobson for this contribution. Really great work.

@dariusrobson
Copy link
Contributor Author

Thank you @iravid, I love the work you guys are doing.
it is great to make my first Open Source contribution and to do it on this project. Thank you for the guidance on the PR. Have a nice weekend!

ghostdogpr pushed a commit to ghostdogpr/scalaz-zio that referenced this pull request Jul 26, 2019
* Add ZStream.effectAsync and variants

* Add canceler as finalizer for effectAsyncInterrupt

* Set outputbuffer defaults to 16

* Cleanup docs

* Formatting

* Implement effectAsync in terms of effectAsyncMaybe

* Eagerly shutdown the queue where not needed

* Use UIO(...).toManaged_ for registration

* Update effectAsyncM and effectAsyncInterruptRight tests

* Cleanup

* Fix effectAsyncM test

* Use promise in effectAsyncInterrupt test

* Remove non-flaky from StreamSpec

* Add Stream forwarding constructors

* Add effectAsyncInterrupt Stream constructor

* Fix test and change StreamSpec references from ZStream to Stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ZStream#effectAsync*

2 participants