Remove the blocking Wait in CallInGodotMain#22
Remove the blocking Wait in CallInGodotMain#22Zoomulator wants to merge 1 commit intofledware:masterfrom
Conversation
|
Thanks! leaving the testing to me is fine. Maybe it's different for me because I'm on a mac. |
|
@Zoomulator would you be willing to rebase from master and see if you can run the main project? If you select GodotXUnit from the assembly selection and click "Run All Tests", it should run something like 15+ tests. |
Using a .net semaphore instead of godot's to be able to await with async rather than block.
3883b77 to
aadb971
Compare
|
@rexfleischer It works! 🥳 |
|
@rexfleischer Hold on, the "IsNotInPhysicsProcess" fails sporadically |
|
It still hangs for me after multiple runs in a row :( |
|
Because of the threading changes in godot, maybe it's a good idea to entirely remove that feature from GodotXUnit and just use your threading changes. |
|
@rexfleischer Yeah I think I've got the same behaviour as you. Which feature are you referring to? The physics frame should still be executed on the main godot thread as far as I'm aware, but yeah something is clearly not executing in a well behaved order. |
|
The feature in GodotXUnit where you can run the test in the update or physics thread. If it's supposed to always be in the main thread now, then I think removing that ability is best. |
|
I haven't looked into how that feature works exactly. AFAIK both Anyway, the changes in this PR won't solve that, but I think it's a more correct version of the code I wrote so probably good to merge anyway? |
|
Multithreaded node processing has been added to 4.1 but it's experimental and should be opt-in only, so I don't really know why we're having issues. Perhaps open an issue and continue our investigation there? |
|
I've tested this by removing the tests that I thought was hanging and it still hangs. I'll have to dive into the code and see where it's hanging to get a better idea of how to fix. But, this points to it not being a godot issue, more of an api usage issue. |

Using a .net semaphore instead of godot's semaphore to be able to await with async rather than a blocking Wait. There wasn't any real reason not to use this to begin with, but there you go! :D
@rexfleischer I wasn't sure how to recreate the hang issues you mentioned here, so I hope you don't mind me leaving the testing up to you to see if it's been resolved!