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

X86_64 Windows Support And Ergonomic Context Wrapper #9

Closed
wants to merge 2 commits into from

Conversation

mark3982
Copy link

I think it may be desirable to use direct memory page allocation for Windows, but this was the easiest and fastest way to get support working. If you do not merge it then maybe you can at least see what needs to be done in order to support Windows.

This adds easy support for x86_64 Windows. It uses the standard heap
allocator for stack allocation, which requires stdlib.
This adds an ergonomic wrapper for Context, which uses an OsStack type
stack. I was unable to make it generic across all stack types, but this
does provide some nice usage. It also supports terminating and prevents
the fiber/thread from being run once it has terminated, and returns a
value indicating if it has terminated.
@mark3982 mark3982 changed the title X86_64 Windows Support X86_64 Windows Support And Ergonomic Context Wrapper May 18, 2015
@mark3982
Copy link
Author

I have made usage more ergonomic, at least when using a Context based on the OsStack. This implementation is named OsFiber and is only enabled on Windows. It provides an easy way to spawn fibers and then detect when they are finished. It also prevents a finished fiber from being run again which would lead to a crash.

@edef1c
Copy link
Owner

edef1c commented Jul 21, 2015

Welp — sorry for not seeing this! I'd like to review this, could you rebase it onto the current master?

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.

None yet

2 participants