[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH] coroutine: Fix documentation of co_aio_sleep_
Re: [Qemu-trivial] [PATCH] coroutine: Fix documentation of co_aio_sleep_ns()
Wed, 8 Nov 2017 09:57:47 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
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
>> 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//.
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
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Description: OpenPGP digital signature