Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyncIO -> IO conversion missing #1790

Closed
kubukoz opened this issue Mar 17, 2021 · 5 comments · Fixed by #1953
Closed

SyncIO -> IO conversion missing #1790

kubukoz opened this issue Mar 17, 2021 · 5 comments · Fixed by #1953

Comments

@kubukoz
Copy link
Member

kubukoz commented Mar 17, 2021

In CE2, there used to be a .toIO method on SyncIO, but now it's gone. I think we should add it.

@kubukoz kubukoz added this to the 3.0.0 milestone Mar 17, 2021
@kubukoz
Copy link
Member Author

kubukoz commented Mar 18, 2021

Because SyncIO shouldn't block, I think this is just a matter of IO(this.unsafeRunSync()). Can someone confirm?

@djspiewak
Copy link
Member

There's some subtlety here unfortunately. What should Sync[SyncIO].blocking(thunk).toIO do?

@djspiewak djspiewak removed this from the 3.0.0 milestone Mar 19, 2021
@kubukoz
Copy link
Member Author

kubukoz commented Mar 25, 2021

uhhh. so I guess we need to interpret the algebra? Shouldn't be too difficult... should it?

@vasilmkd
Copy link
Member

Not sure if it needs to be expanded. E.g. there's no SyncIO.blocking, there's just SyncIO.delay.

@kubukoz
Copy link
Member Author

kubukoz commented Mar 25, 2021

Had me worried for a sec. I can see suspend ignores the hint too.

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 a pull request may close this issue.

3 participants