Skip to content
Snippets Groups Projects
Commit ff8ae468 authored by Bram Veenboer's avatar Bram Veenboer
Browse files

Make ITRFDirection::at thread safe by adding a lock

parent cc7b18f9
Branches
Tags
No related merge requests found
......@@ -80,6 +80,8 @@ ITRFDirection::ITRFDirection(const vector3r_t &direction):
vector3r_t ITRFDirection::at(real_t time) const
{
std::lock_guard<std::mutex> lock(itsMutex);
// Cannot use MeasFrame::resetEpoch(Double), because that assumes the
// argument is UTC in (fractional) days (MJD).
itsFrame.resetEpoch(casacore::Quantity(time, "s"));
......
......@@ -61,6 +61,7 @@ private:
mutable casacore::MeasFrame itsFrame;
mutable casacore::MDirection::Convert itsConverter;
mutable std::mutex itsMutex;
};
// @}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment