> On Aug 30, 2022, at 7:37 PM, 'Kenton Varda' via Cap'n Proto 
> <[email protected]> wrote:
> 
> Hi Jens,
> 
> It sounds very obnoxious that your debugger insists on breaking on this 
> signal. 

I’ve filed a bug report with Apple.

> With that said, you could try compiling with `-DKJ_USE_PIPE_FOR_WAKEUP`, 
> which causes it to avoid using signals for this. You need to compile both KJ 
> itself and your own code that depends on it with this define; if they don't 
> match you may get undefined behavior.

For posterity: since I’m building with CMake, I accomplished this by adding 
`add_compile_definitions(KJ_USE_PIPE_FOR_WAKEUP)` to my top-level 
CMakeLists.txt, above the line `add_subdirectory(vendor/capnproto)`.

Now my code can talk inter-thread RPC over the fake socket! Yay!

But of course there’s always another roadblock. The next one I hit is a fatal 
exception "expected !loop.running; wait() is not allowed from within event 
callbacks.” Apparently code running in an Executor block on the target thread 
is not allowed to call Promise.wait()? This is a bummer, as so far I’ve been 
lazy and written my RPC client code in blocking style. Looks like it’s time to 
fully async-ify it.

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/6A1BA18F-C625-4486-8A71-166D2E6A9268%40mooseyard.com.

Reply via email to