Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004057OCamlOCaml generalpublic2006-06-30 19:532013-09-03 17:15
Reportermottl 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version3.10+dev 
Target VersionFixed in Version 
Summary0004057: Unix.sleep does not return remaining seconds
DescriptionThis 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.
Tagspatch
Attached Files? file icon patchfile [^] (3,296 bytes) 2006-07-09 03:43 [Show Content]

- Relationships

-  Notes
(0003702)
smithjoshuab (reporter)
2006-07-09 03:43

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.

- Issue History
Date Modified Username Field Change
2006-06-30 19:53 mottl New Issue
2006-07-09 03:43 smithjoshuab File Added: patchfile
2006-07-09 03:43 smithjoshuab Note Added: 0003702
2006-07-26 12:01 xleroy Severity minor => feature
2006-07-26 12:01 xleroy Status new => acknowledged
2013-09-03 17:15 doligez Tag Attached: patch


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker