Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

With this sort of thing you'd typically wrap the underlying IPC channel in a system thread and redirect messages to/from it within the local process via an async channel.

The dedicated system thread for the channel means the local process will never block on the incoming IPC events and the redirected messages will be buffered/enqueded as determined by the async runtime.

For reference, I wrote a utility that wraps an IPC library and exposes an async and sync API: https://github.com/alshdavid/ipc-channel-adapter



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: