Add a remark to thread enter warning

This commit is contained in:
Ruslan Mustakov 2018-05-14 21:15:11 +07:00
commit a1d1481967
2 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,4 @@
version = "0.7.9"
version = "0.7.10"
author = "Xored Software, Inc."
description = "Godot Engine bindings"
license = "MIT"

View file

@ -823,6 +823,8 @@ proc registerFrameCallback*(cb: proc () {.closure.}) =
else:
idleCallbacks.add(cb)
{.push stackTrace: off.}
proc godot_nativescript_frame() {.cdecl, exportc, dynlib.} =
var stackBottom {.volatile.}: pointer
{.emit: """
@ -840,7 +842,7 @@ proc godot_nativescript_thread_enter() {.cdecl, exportc, dynlib.} =
when compileOption("threads"):
setupForeignThreadGc()
else:
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."
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. If you see this warning when running the editor and you don't actually use threads, ignore it."
var s = err.toGodotString()
godotPrint(s)
s.deinit()
@ -848,3 +850,5 @@ proc godot_nativescript_thread_enter() {.cdecl, exportc, dynlib.} =
proc godot_nativescript_thread_exit() {.cdecl, exportc, dynlib.} =
when compileOption("threads"):
teardownForeignThreadGc()
{.pop.} # stackTrace: off