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

Implement blocking ::sleep for win32 #5947

Merged
merged 1 commit into from
Apr 15, 2018

Conversation

RX14
Copy link
Contributor

@RX14 RX14 commented Apr 14, 2018

No description provided.

Copy link
Contributor

@ysbaddaden ysbaddaden left a comment

Choose a reason for hiding this comment

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

AFAIK we don't have any blocking sleep... we create a timer and let the event loop continue on.

@RX14
Copy link
Contributor Author

RX14 commented Apr 15, 2018

@ysbaddaden thats why it's in the windows stubs file - we have no scheduler, no fibers, no event loop, so the only thing we can do with sleep I on windows is stub it out temporarily to call blocking sleep.

I guess the commit message is a bit weird though.

@sdogruyol
Copy link
Member

@RX14 how about renaming title / commit message to Stub ::sleep for win32? Other than that it's good to go 👍

@RX14 RX14 merged commit 68c8051 into crystal-lang:master Apr 15, 2018
@RX14 RX14 added this to the Next milestone Apr 15, 2018
chris-huxtable pushed a commit to chris-huxtable/crystal that referenced this pull request Jun 6, 2018
Just calls LibC.Sleep for now, which blocks the whole program.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants