On 11/08/2017 09:47 AM, Paolo Bonzini wrote: > On 08/11/2017 16:42, Stefan Hajnoczi wrote: >>> In any case, co_aio_sleep_ns() >>> + * does not affect the #AioContext where the current coroutine is running, >>> + * as the coroutine will restart on the same #AioContext that it is >>> + * running on. >> I cannot parse the second sentence. What does "affecting" an AioContext >> mean? Does "where the current coroutine is running" simply mean "the >> caller"? >> >> What is it trying to say? My guess is: the caller will be resumed in >> the current AioContext, not the timer's AioContext. > > Yes, that is the intended meaning. Perhaps just s/current//.
How about: This function uses timers and hence needs to know the event loop (#AioContext) to place the timer on. After the time elapses, the current coroutine will restart with the same #AioContext it is currently running in, even if that is different than the timer context passed to co_aio_sleep_ns(). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature