mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
533bf953f987861bfacb3facb8403146a4c9fdcc
According to https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html#//apple_ref/doc/uid/20000738-125024 Cocoa is by default not multithread-safe for programs that use the posix api for creating threads: " For multithreaded applications, Cocoa frameworks use locks and other forms of internal synchronization to ensure they behave correctly. To prevent these locks from degrading performance in the single-threaded case, however, Cocoa does not create them until the application spawns its first new thread using the NSThread class. If you spawn threads using only POSIX thread routines, Cocoa does not receive the notifications it needs to know that your application is now multithreaded. When that happens, operations involving the Cocoa frameworks may destabilize or crash your application. " That includes Go programs. The fix, as discovered by Steeve Morin, is to create and launch an empty NSThread. Add a package that does that, and use it everywhere Cocoa is used. Sigh. Signed-off-by: Elias Naur <mail@eliasnaur.com>
Gio
Immediate mode GUI programs in Go for Android, iOS, macOS, Linux, FreeBSD, OpenBSD, Windows, and WebAssembly (experimental). See the project page gioui.org for documentation and more information.
Issues
File bugs and TODOs through the issue tracker or send an email to ~eliasnaur/gio@todo.sr.ht. For general discussion, use the mailing list: ~eliasnaur/gio@lists.sr.ht.
Contributing
Post discussion to the mailing list and patches to gio-patches. No Sourcehut account is required and you can post without being subscribed.
See the contribution guide for more details.
An unofficial GitHub mirror is kindly maintained by Larry Clapp.
Description
Languages
Go
89.6%
C
7%
Java
1.7%
Objective-C
1.6%