Skip to content

Commit c164948

Browse files
authored
[PluginInitServiece] add some useful comment
1 parent fb9b31a commit c164948

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

PluginInitializerService/PluginInitializerService.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ POP_WARNING()
721721
uint32_t Revoke(const Core::ProxyType<IDispatch>& job, const uint32_t waitTime = Core::infinite)
722722
{
723723
uint32_t result = Core::IWorkerPool::Instance().Revoke(job, waitTime);
724-
_active = true;
724+
_active = true;
725725
return result;
726726
}
727727

@@ -746,7 +746,11 @@ POP_WARNING()
746746
}
747747

748748
private:
749-
std::atomic_bool _active; // needed to make sure the Submit and Schedule will not be done twice once the job has not been starting to execute (see PluginStarter Deinitialzed)
749+
std::atomic_bool _active; // needed to make sure the Submit and Schedule will not be done twice once the job has not been starting to execute (see PluginStarter Deinitialzed).
750+
// This as there are asserts in the JobQueuue checking if the job is already in the queue
751+
// Note not a full mutex is not required as the Submit and Schedule always will be called in a lock itself and the Revoke after the PluginStarter was
752+
// removed from the list so could not lead to a retrigger of Submit or Scheduled (called just before PluginStarter destruction).
753+
// Inside the Dispatch the Job is already out of the queue so then it is not a problem if the Submit or Schedule would be called again
750754
PluginHost::IShell* _requestedPluginShell;
751755
Core::ProxyType<RevokeAndBlockJobType<ActivateResultJob>> _resultjob;
752756
};
@@ -1215,4 +1219,4 @@ POP_WARNING()
12151219
};
12161220

12171221
} // Plugin
1218-
} // Thunder
1222+
} // Thunder

0 commit comments

Comments
 (0)