godot-dispatch-queue
godot-dispatch-queue copied to clipboard
Create new asset in Asset Library for Dispatch Queue with Godot 4 support
Hmm I'm also running into similar problems as before for some reason:
E 0:00:07:0282 dispatch_queue.gd:90 @ execute(): Error calling from signal 'finished' to callable: 'StaticBody3D::_generated_chunk': Method expected 0 arguments, but called with 1.
<C++ Source> core/object/object.cpp:1140 @ emit_signalp()
<Stack Trace> dispatch_queue.gd:90 @ execute()
dispatch_queue.gd:253 @ _run_loop()
For some reason Godot no longer allows signals to be emitted from Threads 🤔
I see that there is now set_thread_safety_checks_enabled(false) which should allow doing so.
For now this code I wrote will fill my use case, but has to be added as a child to work:
https://gist.github.com/tavurth/f3d93b428e5ea4b15d9b7566581e10b4
So basically waiting until the thread is finished (on the main thread) in _physics_process to emit signals.
It's a shame, but I guess this way is more thread safe.
Hi @tavurth.
Error calling from signal 'finished' to callable: 'StaticBody3D::_generated_chunk': Method expected 0 arguments, but called with 1
It seems the method you hooked into the finished signal breaks if you pass arguments to it. I guess if you connect a method that accepts the argument, even if just ignoring it, it should work fine.
By the way, this issue is about creating a new asset in the Asset Store. If you want to further discuss this problem you arised, I'll ask you to create a new Issue or Discussion for it, to avoid discussions out of the issue's topic.
Hi @tavurth.
Error calling from signal 'finished' to callable: 'StaticBody3D::_generated_chunk': Method expected 0 arguments, but called with 1
It seems the method you hooked into the
finishedsignal breaks if you pass arguments to it. I guess if you connect a method that accepts the argument, even if just ignoring it, it should work fine.
Wow I must be needing sleep more than I thought 😅 I didn't notice that and assumed it was another issue! Thank you!