Am 20/07/2022 um 15:06 schrieb Vladimir Sementsov-Ogievskiy: > On 7/19/22 15:00, Emanuele Giuseppe Esposito wrote: >> >> >> Am 11/07/2022 um 15:08 schrieb Vladimir Sementsov-Ogievskiy: >>> >>> That made me ask: >>> >>> 1. Are all tests always run in main loop? If yes, why to protect status >>> reading in test_complete_in_standby() ? >>> >>> 2. Maybe, we don't need to protect anything here? Why to protect other >>> things if we run everything in main loop? >> >> I think it's still good example and practice to protect a function if it >> needs to be protected and its name ends with _locked. It would just >> confuse the reader if we don't protect it. >> > > Agree. But still, I think we should be consistent in such decisions. If > you don't want to protect job->status in tests, then you shouldn't > protect it in test_complete_in_standby() as well, just to not confuse > someone who read the code. > > Ok, I will protect job->status in those tests too. Emanuele
- [PATCH v9 00/21] job: replace AioContext lock... Emanuele Giuseppe Esposito
- [PATCH v9 08/21] jobs: add job lock in f... Emanuele Giuseppe Esposito
- Re: [PATCH v9 08/21] jobs: add job l... Vladimir Sementsov-Ogievskiy
- [PATCH v9 06/21] job: move and update co... Emanuele Giuseppe Esposito
- Re: [PATCH v9 06/21] job: move and u... Vladimir Sementsov-Ogievskiy
- [PATCH v9 09/21] jobs: use job locks als... Emanuele Giuseppe Esposito
- Re: [PATCH v9 09/21] jobs: use job l... Vladimir Sementsov-Ogievskiy
- Re: [PATCH v9 09/21] jobs: use j... Emanuele Giuseppe Esposito
- Re: [PATCH v9 09/21] jobs: u... Vladimir Sementsov-Ogievskiy
- Re: [PATCH v9 09/21] jo... Emanuele Giuseppe Esposito
- [PATCH v9 02/21] job.h: categorize field... Emanuele Giuseppe Esposito
- [PATCH v9 13/21] job: detect change of a... Emanuele Giuseppe Esposito
- Re: [PATCH v9 13/21] job: detect cha... Vladimir Sementsov-Ogievskiy
- [PATCH v9 12/21] commit and mirror: crea... Emanuele Giuseppe Esposito
- Re: [PATCH v9 12/21] commit and mirr... Vladimir Sementsov-Ogievskiy
- [PATCH v9 07/21] blockjob: introduce blo... Emanuele Giuseppe Esposito
- Re: [PATCH v9 07/21] blockjob: intro... Vladimir Sementsov-Ogievskiy
- Re: [PATCH v9 07/21] blockjob: i... Emanuele Giuseppe Esposito
- [PATCH v9 17/21] blockjob.h: categorize ... Emanuele Giuseppe Esposito
- Re: [PATCH v9 17/21] blockjob.h: cat... Vladimir Sementsov-Ogievskiy