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
Android: Threading issues #190
Comments
I believe this is something that @MatthiasWM could address. Matthias? Note: I'm working on a new implementation of FLTK's timeout mechanism which could affect the internals used here in the Android port. But anyway, maybe the suggestion can be applied. |
Sorry, I have not touched the Android implementation in a long while. It will take at least a week to find myself back into the code. Wrapping up Fluid and Preferences has priority right now. But, yeah, the patch doesn't look wrong at first glance. |
Thanks, Matthias, I assigned this issue to you. Feel free to unassign... |
The Android port has been removed from the FLTK for now. The implementation was incomplete and highly experimental. |
Sorry for any inconvenience. |
Let's hope FLTK will return to Android (and maybe even iOS) sooner or later. |
Yes, Android, iOS, and Linux frame buffer support are in the pipeline. |
On Android, FLTK's locking mechanisms don't work correctly (deadlock crashes), neither for enabling the global lock (via Fl::lock) or thru the Fl::awake(void *) messages (pipes). The Fl_lock.cxx file has the locking functions in an Android ifdef and remain to be implemented. I was able to get things working by subclassing the Fl_Android_System_Driver from the Fl_Posix_System_Driver instead of the Fl_System_Driver. I had to copy some implementation of the other posix systems (X11 namely for locking) since Android also uses pthreads.
The above diff works for multithreading, for Fl::awake I just use a std::queue, std::unique_lock and a mutex (in the Rust wrapper).
Edit: cleaned up patch thanks to Manolo's refactoring.
The text was updated successfully, but these errors were encountered: