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
Original bug ID: 4057 Reporter:@mmottl Status: acknowledged (set by @xavierleroy on 2006-07-26T10:01:58Z) Resolution: open Priority: normal Severity: feature Version: 3.10+dev Category: otherlibs Tags: patch Monitored by: jm @mmottl smithjoshuab
Bug description
This is a problem with the present API: Unix.sleep does not return an integer, which makes it impossible to find out whether e.g. a signal has interrupted the system call, and how many seconds there are still left to sleep. Changing the API accordingly would lead to warnings only in existing code so this may be worth considering.
I've uploaded a patch to the 3.09.2 source that accomplishes this. It looks like adding this functionality (sleep returns int) to the threading code is not simple. I've added a kludge, but it's not a solution in the strict sense.
It does not break code, but will create warnings in extant code. I've tested it in non-threaded code and it works well. The thread-delay/sleep problem is bigger, though, and (to my poorly-skilled eyes) probably a major impediment to having this functionality implemented in a way that is responsible.
Since 4.07, I think, Unix.sleep and related functions restart the sleep when they are interrupted by a signal. This obviates the primary need for returning the time left. Moreover, I'm really not keen to change the type of the sleep functions and break a lot of code.
Original bug ID: 4057
Reporter: @mmottl
Status: acknowledged (set by @xavierleroy on 2006-07-26T10:01:58Z)
Resolution: open
Priority: normal
Severity: feature
Version: 3.10+dev
Category: otherlibs
Tags: patch
Monitored by: jm @mmottl smithjoshuab
Bug description
This is a problem with the present API: Unix.sleep does not return an integer, which makes it impossible to find out whether e.g. a signal has interrupted the system call, and how many seconds there are still left to sleep. Changing the API accordingly would lead to warnings only in existing code so this may be worth considering.
File attachments
The text was updated successfully, but these errors were encountered: