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

Expose the main thread. #39

Closed
emidoots opened this issue Nov 8, 2014 · 2 comments
Closed

Expose the main thread. #39

emidoots opened this issue Nov 8, 2014 · 2 comments

Comments

@emidoots
Copy link

emidoots commented Nov 8, 2014

There are certain situations where one needs explicit ownership of the main loop. A good example of this is Cocoa API's which must be executed on strictly the main thread, inherently any GUI libraries that operate on OS X also have this requirement.

The goal is to expose control of the main loop to the user of the package, if they so desire.

I propose exposing a channel window.MainLoopChan over which arbitrary functions (which MUST be ran on the main thread) will be sent by running windows.

This would allow for a swift communication with the window package on-demand (i.e. when the window package doesn't need to execute functions, you don't execute any, in contrast to busy-waiting glfwPollEvents and things).

At least one problematic side effect of this is that we can no longer utilize go.mobile/app because it steals the main loop entirely.

See azul3d-legacy/issues#29 for previous discussion.

@emidoots emidoots self-assigned this Nov 8, 2014
@emidoots emidoots added this to the Version 2 milestone Nov 8, 2014
@emidoots emidoots changed the title Expose the main loop. Expose the main thread. Nov 8, 2014
@emidoots
Copy link
Author

emidoots commented Nov 8, 2014

Something I want to clarify: This would expose the main thread but would not offer any communication with the OpenGL render loop.

emidoots pushed a commit that referenced this issue Nov 15, 2014
@emidoots
Copy link
Author

See also discussion in #40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant