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

runtime: no examples for LockOSThread and UnlockOSThread #31911

Open
msoedov opened this issue May 8, 2019 · 2 comments

Comments

Projects
None yet
5 participants
@msoedov
Copy link
Contributor

commented May 8, 2019

What version of Go are you using (go version)?

$ go version

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

What did you expect to see?

What did you see instead?

@ianlancetaylor ianlancetaylor changed the title No examples in documentation for `runtime.LockOSThread` and `runtime.UnlockOSThread()` runtime: no examples for LockOSThread and UnlockOSThread May 8, 2019

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone May 8, 2019

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented May 8, 2019

These are not easy functions to write good examples for. This might be better suited for a blog post. But if someone has a good idea for how to present these functions in a way that helps people use them correctly and meaningfully, go for it.

@beoran

This comment has been minimized.

Copy link

commented May 9, 2019

These function are essential for doing GUI and graphic programming on many OS, because on many systems, only the first main thread may interact with the GUI or the OS's graphics subsystem.

In general, I feel that Go needs to focus not only on being a back end language but also more on native development. An official go lang blog post on the topic, with descriptions of LockOsThread and UnlockOsThread included would be very welcome indeed, and time permitting, I would certainly like to help proofread or smake suggestions for such a post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.