Fix thread_enter not to use GC
This commit is contained in:
parent
7f73a89878
commit
1b47dac4e9
2 changed files with 5 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
version = "0.6.1"
|
version = "0.6.2"
|
||||||
author = "Xored Software, Inc."
|
author = "Xored Software, Inc."
|
||||||
description = "Godot Engine bindings"
|
description = "Godot Engine bindings"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
||||||
|
|
@ -828,7 +828,10 @@ proc godot_nativescript_thread_enter() {.cdecl, exportc, dynlib.} =
|
||||||
when compileOption("threads"):
|
when compileOption("threads"):
|
||||||
setupForeignThreadGc()
|
setupForeignThreadGc()
|
||||||
else:
|
else:
|
||||||
print(cstring"A foreign thread is created, but app is compiled without --threads:on. Bad things will happen if Nim code is invoked from this thread.")
|
const err = cstring"A foreign thread is created, but app is compiled without --threads:on. Bad things will happen if Nim code is invoked from this thread."
|
||||||
|
var s = err.toGodotString()
|
||||||
|
godotPrint(s)
|
||||||
|
s.deinit()
|
||||||
|
|
||||||
proc godot_nativescript_thread_exit() {.cdecl, exportc, dynlib.} =
|
proc godot_nativescript_thread_exit() {.cdecl, exportc, dynlib.} =
|
||||||
when compileOption("threads"):
|
when compileOption("threads"):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue