You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
417 B
Go
21 lines
417 B
Go
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
// Package cocoainit initializes support for multithreaded
|
|
// programs in Cocoa.
|
|
package cocoainit
|
|
|
|
/*
|
|
#cgo CFLAGS: -xobjective-c -fmodules -fobjc-arc
|
|
#import <Foundation/Foundation.h>
|
|
|
|
static inline void activate_cocoa_multithreading() {
|
|
[[NSThread new] start];
|
|
}
|
|
#pragma GCC visibility push(hidden)
|
|
*/
|
|
import "C"
|
|
|
|
func init() {
|
|
C.activate_cocoa_multithreading()
|
|
}
|