-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support for other Thread structures #9
Comments
Mutex is already done. Right? |
Ah my mistake, Mutex is indeed there. Queue would definitely be useful for thread pools. |
As same as reason I commented in another issue, mruby-thread is not green thread. So Queue may not be easy to implement. |
@mattn would implementing MRI 1.9 style pthread-based Thread / Mutex require adding a GIL to mruby? |
mruby-thread is marshaling values between main thread's mrb_state and another thread's mrb_state. https://github.com/mattn/mruby-thread/blob/master/src/mrb_thread.c#L65 So the proc which is generated in main thread doesn't work at another thread. |
Is this closable? #7 |
I think it's possible to implement Queue using |
As I said, mruby-thread is not green thread, So context is not shared. Even though you create Queue out side of thread, you can't manipulate it, |
Would be useful if Queue, SizedQueue were also supported.
The text was updated successfully, but these errors were encountered: