Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace usleep with std::this_thread::sleep_for #46143

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

Dr15Jones
Copy link
Contributor

PR description:

POSIX has deprecated the use of usleep

This was pointed out by the 'flaw finder' on the IB page.

PR validation:

code compiles.

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 27, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46143/41937

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones for master.

It involves the following packages:

  • FWCore/Concurrency (core)
  • FWCore/Framework (core)
  • FWCore/Integration (core)
  • FWCore/Modules (core)
  • FWCore/Sources (core)
  • IOMC/RandomEngine (core)

@Dr15Jones, @makortel, @smuzaffar can you please review it and eventually sign? Thanks.
@fabiocos, @makortel, @missirol, @wddgit this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@@ -170,7 +170,7 @@ Example: protecting `std::cout` so printouts do not intertwine.
oneapi::tbb::task_group group;
for(int i=0; i<3; ++i) {
group.run([&queue, &group] {
usleep(1000);
std::this_thread::sleep_for(1000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a unit of time for this example?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

POSIX has deprecated the use of usleep
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46143/41938

@cmsbuild
Copy link
Contributor

Pull request #46143 was updated. @Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please check and sign again.

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals-INPUT
Size: This PR adds an extra 12KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-247edf/41815/summary.html
COMMIT: 5437d35
CMSSW: CMSSW_14_2_X_2024-09-30-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/46143/41815/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

  • 2022.1000012022.100001_RunJetHT2022C_10k/step1_dasquery.log
  • 2023.0000012023.000001_RunMuonEG2023C_10k/step1_dasquery.log
  • 2023.0010012023.001001_RunDisplacedJet2023C_10k/step1_dasquery.log
Expand to see more relval errors ...
  • 2023.100001
  • 2022.100001
  • 2023.000001
  • 2023.001001
  • 2023.100001

Comparison Summary

Summary:

@Dr15Jones
Copy link
Contributor Author

failures due to das query failures. Not caused by this PR.

@makortel
Copy link
Contributor

Comparison differences are related to #39803

@makortel
Copy link
Contributor

+core

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (but tests are reportedly failing). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @antoniovilela, @rappoccio, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2)

@makortel
Copy link
Contributor

ignore tests-rejected with external-failure

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit cbe2a3e into cms-sw:master Oct 2, 2024
10 of 11 checks passed
@Dr15Jones Dr15Jones deleted the usleepReplace branch October 8, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants