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

Breaking changes some control methods #79

Merged
merged 3 commits into from Oct 15, 2022
Merged

Conversation

Code-Hex
Copy link
Owner

@Code-Hex Code-Hex commented Oct 15, 2022

Why

  • Not simple.
  • Some control methods have a callback parameter and invoke it on Objective-C's thread, not on the goroutine. If you call runtime.Goexit function on the callback, Go will throw "internal lockOSThread error" because the function terminates the goroutine that calls it, however, there is no goroutine in Objective-C's thread. Some Fatal function calls the runtime.Goexit function within it. It would be very difficult for users to understand this rule.

Note

I recommend using StateChangedNotify instead of calling callback.

@Code-Hex Code-Hex changed the title Breaking changes some controller methods Breaking changes some control methods Oct 15, 2022
@Code-Hex Code-Hex merged commit 240b1dc into master Oct 15, 2022
@Code-Hex Code-Hex deleted the breaking-change/controller branch October 15, 2022 15:21
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

1 participant