You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vpd-manager calls Worker::collectFrusFromJson() to parse and publish VPD of all FRUs.
Worker::collectFrusFromJson() iterates through the list of FRUs in System Config JSON and launches a detached thread for VPD collection of each FRU.
Within the body of this detached thread, we are calling std::async with default launch policy, in order to parse and publish the VPD of a FRU in an asynchronous manner. See Worker::collectFrusFromJson()
Issue:
Calling std::async inside the detached thread for a FRU and then collecting the result in a std::future is an unnecessary performance overhead.
Calling std::async without specifying launch policy may potentially launch another thread. See std::async
std::async may throw some exceptions. Worker::collectFrusFromJson() doxygen does not capture this.
As we already have a dedicated detached thread for collecting VPD of a FRU, we should just parse and publish the VPD for this FRU in a synchronous manner from the thread.
The text was updated successfully, but these errors were encountered:
Context:
vpd-manager
callsWorker::collectFrusFromJson()
to parse and publish VPD of all FRUs.Worker::collectFrusFromJson()
iterates through the list of FRUs in System Config JSON and launches a detached thread for VPD collection of each FRU.std::async
with defaultlaunch
policy, in order to parse and publish the VPD of a FRU in an asynchronous manner. See Worker::collectFrusFromJson()Issue:
std::async
inside the detached thread for a FRU and then collecting the result in astd::future
is an unnecessary performance overhead.std::async
without specifying launch policy may potentially launch another thread. See std::asyncstd::async
may throw some exceptions.Worker::collectFrusFromJson()
doxygen does not capture this.As we already have a dedicated detached thread for collecting VPD of a FRU, we should just parse and publish the VPD for this FRU in a synchronous manner from the thread.
The text was updated successfully, but these errors were encountered: