On Sat, Dec 14, 2019 at 11:31 AM <bucha...@gmail.com> wrote:
>
> I'd really love to get that LockOSThread call out of the main function and 
> hide it away inside a library along with the other internal implementation 
> details. Is that possible? As far as I can tell, it's not possible to ensure 
> that a goroutine runs on the main thread without locking it directly from the 
> main() function.

I don't know if this helps, but you can lock the main goroutine to a
thread by calling LockOSThread in an init function.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVZUA9dvaST8dXNLL3khQUcgG%3DLcc8b3ZM9SR8nQfvJEg%40mail.gmail.com.

Reply via email to