Several questions concerning libeio internals(+)
Marc Lehmann
schmorp at schmorp.de
Wed Dec 16 19:36:32 CET 2015
On Wed, Dec 16, 2015 at 07:06:18PM +0300, Nick Zavaritsky <mejedi at gmail.com> wrote:
> Consider eio_open (const char *path, int flags, mode_t mode, int pri, eio_cb cb, void *data).
>
> Assume thread A calls eio_open, I want the completion callback to be invoked in the same thread.
You need some communications mechanism for your threads - that's outside
the scope of libeio, really.
> However since there’s the single result queue, it’s impossible to route the completed request to the particular thread.
If it's impossible to route completed requests to the particular thread
that wants the result, then nothing in libeio can fix that, since it is
impossible. Since it is, in general, possible to route requests (or any
data structure) to specific threads, I think that statement is wrong. What
that mechanism is varies widely between implementations, so I am not sure
libeio should force a specific one.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the libev
mailing list