Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-29 Thread Max Reitz
On 2018-08-27 17:54, John Snow wrote: > > > On 08/25/2018 09:05 AM, Max Reitz wrote: >> On 2018-08-22 23:52, John Snow wrote: >>> >>> >>> On 08/22/2018 07:43 AM, Max Reitz wrote: On 2018-08-17 21:04, John Snow wrote: > All jobs do the same thing when they leave their running loop: >

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-27 Thread John Snow
On 08/25/2018 09:05 AM, Max Reitz wrote: > On 2018-08-22 23:52, John Snow wrote: >> >> >> On 08/22/2018 07:43 AM, Max Reitz wrote: >>> On 2018-08-17 21:04, John Snow wrote: All jobs do the same thing when they leave their running loop: - Store the return code in a structure - wait

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-25 Thread Max Reitz
On 2018-08-22 23:52, John Snow wrote: > > > On 08/22/2018 07:43 AM, Max Reitz wrote: >> On 2018-08-17 21:04, John Snow wrote: >>> All jobs do the same thing when they leave their running loop: >>> - Store the return code in a structure >>> - wait to receive this structure in the main thread >>> -

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-25 Thread Max Reitz
On 2018-08-22 23:45, John Snow wrote: > > > On 08/22/2018 07:52 AM, Max Reitz wrote: >> On 2018-08-22 13:43, Max Reitz wrote: >> >> [...] >> >>> I'd like .main_loop_settle(). Or .main_loop_post_run(). I think it's >>> OK to have names that aren't as cool and tense as possible, when in >>> retur

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-22 Thread John Snow
On 08/22/2018 06:01 PM, Eric Blake wrote: > On 08/22/2018 06:43 AM, Max Reitz wrote: >> On 2018-08-17 21:04, John Snow wrote: >>> All jobs do the same thing when they leave their running loop: >>> - Store the return code in a structure >>> - wait to receive this structure in the main thread >>>

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-22 Thread Eric Blake
On 08/22/2018 06:43 AM, Max Reitz wrote: On 2018-08-17 21:04, John Snow wrote: All jobs do the same thing when they leave their running loop: - Store the return code in a structure - wait to receive this structure in the main thread - signal job completion via job_completed Few jobs do anything

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-22 Thread John Snow
On 08/22/2018 07:43 AM, Max Reitz wrote: > On 2018-08-17 21:04, John Snow wrote: >> All jobs do the same thing when they leave their running loop: >> - Store the return code in a structure >> - wait to receive this structure in the main thread >> - signal job completion via job_completed >> >> F

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-22 Thread John Snow
On 08/22/2018 07:52 AM, Max Reitz wrote: > On 2018-08-22 13:43, Max Reitz wrote: > > [...] > >> I'd like .main_loop_settle(). Or .main_loop_post_run(). I think it's >> OK to have names that aren't as cool and tense as possible, when in >> return they actually tell you what they're doing. (S

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-22 Thread Max Reitz
On 2018-08-22 13:43, Max Reitz wrote: [...] > I'd like .main_loop_settle(). Or .main_loop_post_run(). I think it's > OK to have names that aren't as cool and tense as possible, when in > return they actually tell you what they're doing. (Sure, > .main_loop_post_run() sounds really stupid, but

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-22 Thread Max Reitz
On 2018-08-17 21:04, John Snow wrote: > All jobs do the same thing when they leave their running loop: > - Store the return code in a structure > - wait to receive this structure in the main thread > - signal job completion via job_completed > > Few jobs do anything beyond exactly this. Consolidat

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-20 Thread Eric Blake
On 08/17/2018 02:04 PM, John Snow wrote: All jobs do the same thing when they leave their running loop: - Store the return code in a structure - wait to receive this structure in the main thread - signal job completion via job_completed Few jobs do anything beyond exactly this. Consolidate this

[Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-17 Thread John Snow
All jobs do the same thing when they leave their running loop: - Store the return code in a structure - wait to receive this structure in the main thread - signal job completion via job_completed Few jobs do anything beyond exactly this. Consolidate this exit logic for a net reduction in SLOC. Mo