Closed pct-cclausen closed 3 years ago
// the referenced actor file: export default class Printer { printNumber(n: number) { console.log(n); } } // main file: const root = await system.rootActor(); async function doTest(mode: "in-memory" | "forked" | "threaded") { const testActor = await root.createChild("/dist/src/printer", { mode }); console.log("Output for: " + mode); await testActor.sendAndReceive("printNumber", 0); await testActor.destroy(); } await doTest("in-memory"); await doTest("forked"); await doTest("threaded");
This prints: Output for: in-memory 0 Output for: forked undefined Output for: threaded undefined
I'd expect it to print 0 for all 3 cases, it seems there must be some sort of if (message) ... in the code somewhere that causes this.
Hi @pct-cclausen ! Thank you so much for your activity and this report! I'm about to start the bug-fixing for this report and the previous one.
Fixing this in #58 .
Fix released in version 2.1.3.
2.1.3
This prints: Output for: in-memory 0 Output for: forked undefined Output for: threaded undefined
I'd expect it to print 0 for all 3 cases, it seems there must be some sort of if (message) ... in the code somewhere that causes this.