Conversation
|
Thanks for your pull request! Could you please indicate which version of WorldEdit you used for testing (which should also supports Folia) ? Thanks |
|
Yes i can, i used a fork from Euphillya: https://github.com/Euphillya/WorldEdit-Folia/releases |
|
Thanks! Have you checked the thread safety of the WESV internal data structures? I will test it soon, but I'm pretty sure they can be accessed by different threads (are commands, events, and repeated tasks still run on the same thread in Folia?). This could cause concurrency issues since the plugin is not thread-safe yet, even if no errors occurred during testing. |
|
So i did a bunch of testing... I found 2 issues in the commands that i missed out when testing. It should all be working now, and i'm pretty sure it's thread-safe. You can do more testing if you want tho just to be sure. |
|
Still haven’t found the time to look closely, but for example the player commands and events (join/quit/world change/item change) are executed in the context of the region owning the player, but the WESV loops are executed in the context of the global region, so couldn’t this cause some concurrency issues ? Especially as concurrency issues cannot always be detected by doing a lot of testing, and such issues are way more likely to occur on big servers with many entities/regions than during testing without an important number of players where threads overlapping are not frequent |
|
Nah i don't think so, besides if we wanted it to not loop in the global server scheduler where would it loop then? |
|
After some verification (thanks also to PaperMC Discord for their hints), on Folia player join/quit are always called on the thread that is currently ticking that player (like that's the whole point of Folia!), which might be different from the global region scheduler. I've added Folia support on the above commit, by using Thanks again for your help! |
This PR aims to adding folia support.
Tested in: