New Issue: Should Chapel continue to support 'sleep()' in its standard library?

18467, "bradcray", "Should Chapel continue to support 'sleep()' in its standard library?", "2021-09-27T18:16:25Z"

[this is an extension of a discussion that started on ]

Today, Chapel supports a sleep() routine in its standard library, which has the net effect of having a task not run until a specified amount of time has passed.

Internally, we've been debating whether sleep() is something we should continue to support or not, where the arguments go something like:

  • let's get rid of sleep because there are arguably better ways to express most patterns where it's used (e.g., perhaps we should support a Chapel equivalent of POSIX's select(3p)), and supporting it can lead to abuse or misuse
  • let's keep sleep because it can be useful in some cases and if users started calling out to C's sleep() or writing their own, they may just get into more trouble.
    • in doing so, we could put more warnings on it about potential downsides and alternatives one might consider

This issue is designed to put this issue out in the public in case users want to comment on it.