Skip to contentSkip to conversation

About coroutine inside qemu

Qemu-devel Yaodong Yang 2 participants 2 messages Aug 30, 2013 – Sep 2, 2013

lore
Share & tools
lore
#0 lore raw

When a new work thread, which is not inside coroutine,  enter a coroutine(named as A), what happened to the work thread? Is it true that the work thread also become a coroutine, or it just stop? Later if the coroutine A call yield. what happened to the work thread?

#1 lore raw
Quoted 4 lines · Yaodong Yang

When a new work thread, which is not inside coroutine,  enter a coroutine(named as A), what happened to the work thread? Is it true that the work thread also become a coroutine, or it just stop? Later if the coroutine A call yield. what happened to the work thread?

qemu_coroutine_enter() returns when the coroutine yields or terminates.

Therefore the thread gives its control to the coroutine until it yields or terminates.

Stefan