Hi Andre,

As I understand it, it's the other way around: The Win32 thread pool API
wraps the low-level IOCP API. KJ currently does not use the thread pool API
but rather uses low-level IOCPs directly. It creates an IOCP and reads
events from it entirely in the main thread. Arguably using an IOCP in a
single-threaded way defeats some of the purpose, but the current KJ code is
not designed to allow events to be dispatched on multiple threads from the
same event loop.

-Kenton

On Wed, Jan 18, 2017 at 9:57 AM, <[email protected]> wrote:

> Hi, i an trying to figure out how multiple threads are started in kj,
> It looks like they are started independently in other code atleast the
> Unix code but what I don't understand in the windows code first
> CreateThread is used in thread.h and then completionport created in
> async-io-win32.h because completionport is a wrapper around threadpool. Is
> the intention to create one thread at the event loop and port and the
> create an other thread with a loop or is it supposed to create multiple
> threads based on the number of cores?
>
> Cheers Andre
>
> --
> 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].
> Visit this group at https://groups.google.com/group/capnproto.
>

-- 
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].
Visit this group at https://groups.google.com/group/capnproto.

Reply via email to