> On Aug 30, 2022, at 7:37 PM, 'Kenton Varda' via Cap'n Proto <
capn...@googlegroups.com> 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