Posts: 721
Threads: 77
Joined: Apr 2014
Thanks: 113
Given 130 thank(s) in 91 post(s)
10-11-2016, 05:42 AM
(This post was last modified: 10-11-2016, 05:43 AM by LogicParrot.)
ScheduleMoveToWorld is currently broken and I am planning to fix this.
Why were the MoveToWorld API functions marked obsolete and why was ScheduleMoveToWorld introduced?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
MoveToWorld originally operated synchronously - it would not return until the player was moved. And it was a big source of deadlocks because of trying to synchronize two tick threads and possibly other threads waiting for the plugin.
Posts: 721
Threads: 77
Joined: Apr 2014
Thanks: 113
Given 130 thank(s) in 91 post(s)
Is it safe to say that we can remove ScheduleMoveToWorld, now that MoveToWorld is not synchronous?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
Usually when we remove a method that was exported in the LuaAPI, we still provide a manual binding for it that logs a warning that the method is obsoleted, what method should be used instead and a Lua stacktrace, then redirect to the new API. This way, the plugins still work and the plugin authors have a clear indication of what's wrong and how to fix it.