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

Fiber Support? #9

Open
aphadeon opened this issue Jul 15, 2016 · 5 comments
Open

Fiber Support? #9

aphadeon opened this issue Jul 15, 2016 · 5 comments
Assignees

Comments

@aphadeon
Copy link

When attempting to create a Fiber in IronRuby, I get an undefined constant error for the name Fiber. I've tried searching, and made sure to load the threading library in case it was in there.

I am emulating an existing engine whose scripts make use of Fiber; before resorting to trying to implement it myself, I want to be sure I'm not just missing something.

So my question is, does IronRuby support, or plan to support, the Fiber class?

Worth noting that I've tried both the official binaries as well as building from source.

I was able to find this, in case anyone else has a similar issue. Significantly less performant, but works in a pinch: https://gist.github.com/tmm1/4631

Would like to know if it is supported, planned, or not supported, as searching the topic yields very little information.

@aphadeon
Copy link
Author

Moved this issue from IronLanguages/main#1195

@amiralles
Copy link

Hi @avarisc I'll investigate this one the next week. If is not supported right now, it'll be at the future. Not sure how much effort/time will take, though. (After a brief inspection of MRI's implementation you can tell for sure that is not the easiest thing to do, but is not impossible either).

PS: Been a long since I look at this code base (six years or so), so it may take a while, but eventually I'll get up to speed and get back at you.

@amiralles
Copy link

Hey @avarisc, I been doing a copule of experiments trying to implement this feature, and the bad news is, since that there's no builtin support for fibers on .NET, there is no way to implement this feature in any reliable way. There are some "hackie" solutions out there, such as emulate fibers with iterators or direct calls to the Windows Fiber API, but none of them convinced me.... I'll keep working on this and try what JRuby does (use threads instead of fibers) but I'm not sure if ever is gonna make it to prod. Sorry.

@aphadeon
Copy link
Author

A thread-based solution might be worthwhile for compatibility, if nothing else. Not familiar with JRuby's internals, but having a nonperformant Fiber class might be preferable to Fiber simply not existing?
Either way, I appreciate your effort on this.

@amiralles
Copy link

My pleasure. With regards to JRuby's Fiber implementation, that's exactly
what they say; "While is not optimal, a thread based Fiber implementation
is better than not having Fiber at all".
I'll keep looking at this and let you to know if I make any progress.

On 26 September 2016 at 11:53, Jason B. [email protected] wrote:

A thread-based solution might be worthwhile for compatibility, if nothing
else. Not familiar with JRuby's internals, but having a nonperformant Fiber
class might be preferable to Fiber simply not existing?
Either way, I appreciate your effort on this.


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#9 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACBcdDkSz7IkKa2Wz3SuTjxIT2FpYNbdks5qt9xQgaJpZM4JNge_
.

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

No branches or pull requests

2 participants