github.com/cybriq/giocore@v0.0.7-0.20210703034601-cfb9cb5f3900/internal/cocoainit/cocoa_darwin.go (about) 1 // SPDX-License-Identifier: Unlicense OR MIT 2 3 // Package cocoainit initializes support for multithreaded 4 // programs in Cocoa. 5 package cocoainit 6 7 /* 8 #cgo CFLAGS: -xobjective-c -fmodules -fobjc-arc 9 #import <Foundation/Foundation.h> 10 11 static inline void activate_cocoa_multithreading() { 12 [[NSThread new] start]; 13 } 14 #pragma GCC visibility push(hidden) 15 */ 16 import "C" 17 18 func init() { 19 C.activate_cocoa_multithreading() 20 }