joo
Explore posts from serversSource code generation not working with partial record, only with partial class
Using a basic incremental source code generator to generate some serializer-like functionality.
Generated Code:
* Record:
* Class:
With class I can access
DecodePacket
and EncodePacket
just fine, however for the record I'm unable to access It. Also If I copy the partial record
without any source code just below the original record
It works fine aswell.
Any Idea why this isn't working for records?9 replies
'Spawn' multiple promises from the same module
I'm trying to use Deno for scripted npcs in a game, the main issue that the npc has to await user action so I've used a mpsc Channel for this with an async fn op which works fine. However since the npcs exists on the server side I need to be able to call the same npc multiple times on the same runtime.
My current test script looks like this
The problem I'm facing right now, I'd like to load the module once, remove the await in the end and then spawn multiple npc_actions while the event loop is running. So far I was only able to get a
Local
reference to the function, but when I call It I can no longer run the ev loop because the scope references the runtime.
What would be the best way to approach that?4 replies