From 56a68c6faefcd4151fbd5b28335687d8900771e0 Mon Sep 17 00:00:00 2001 From: Felix Angell Date: Mon, 7 May 2018 12:04:25 +0100 Subject: [PATCH] lock os thread --- main.go | 2 ++ testsamples/main.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 testsamples/main.c diff --git a/main.go b/main.go index f6fee36..1440790 100644 --- a/main.go +++ b/main.go @@ -67,6 +67,8 @@ func (n *PhiEditor) render(ctx *strife.Renderer) { } func main() { + runtime.LockOSThread() + config := cfg.Setup() ww, wh := 1280, 720 diff --git a/testsamples/main.c b/testsamples/main.c new file mode 100644 index 0000000..5ebd20d --- /dev/null +++ b/testsamples/main.c @@ -0,0 +1,17 @@ +#include + +int main() { + int age; + scanf("%d\n", &age); + printf("wow, you are %d years old!\n", age); + + { + int x = 3; + printf("%d\n", x); + x = 4; + int* y = &x; + printf("Hello world %d, %d!\n", x, *y); + } + + return 0; +} \ No newline at end of file