-
- Downloads
[IO] use our affinity capabilities in the io subsystem
Set the affinity for Fibers created from the completer thread to the workerId where the completion originated from. First, we split up the Callback type in a user facing and an internal one. The internal one has a new affinity member which provides the memory for the new Fibers affinity buffer. This is memory safe because the Callback object is always heap allocated and freed when the CallbackFiber terminates. Second, each Future has an affinity member as well which will be passed to the BinaryPrivateSemaphore when calling signalFromAnywhere to again hint the originating worker. Both affinity values are set during the preparation of the Future in IoContext::prepareFutureChain because then we are sure in which worker's IoContext the completion will be generated.
parent
5b1c238e
No related branches found
No related tags found
Loading
Please register or sign in to comment