Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upRelocate or redirect `sleep` function? #693
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
process-bot
Aug 18, 2016
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Aug 18, 2016
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Added to #322 |
evancz
closed this
Sep 22, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jvoigtlaender commentedAug 18, 2016
Currently it exists as
It's not obvious to find there:
TimeorTaskmodules.Other considerations:
Task.Delay.Processmodule is about processes created with, or possessing, aProcessId, butsleepdoes not take one of those.spawned their own process. What would probably be clearer would be to say that the "process the task returned by that function is running in" is blocked. Which amounts to saying that "the task returned by this function" sleeps for a while. No need to bring "process" into the picture. That's an argument for this being a better fit for theTaskmodule.Taskis performed it becomes a little process. Specifically, neither the documentation page forTask, nor the guide's page on tasks linked from there contain the word "process" even once. So how could a user who wants to add a delay in a task chain ever guess that theProcessmodule is relevant (i.e., that they may find the sought functionality there)?My proposal is to move this function to the
Taskmodule:Secondary proposals could be to not relocate it, but use redirections instead:
Task.sleep = Process.sleepTime.sleep = Process.sleepBut I don't think having the function live in different modules is necessary. Why would a user who knows they are looking for a function of type
Time -> Task x ()be able to find it in moduleTimeand/or in moduleProcess, but not in moduleTask? The functionality is clearly "time"- and "task"-related, but not so obviously "process"-related.