Opened 4 years ago

Last modified 4 years ago

#1325 new defect

Whostate supplied by #'process-wait and #'process-wait-with-timeout effectively ignored

Reported by: svspire Owned by: svspire
Priority: normal Milestone:
Component: IDE Version: trunk
Keywords: Cc:


#'%nanosleep shouldn't change process whostate. If it does, it makes whostate supplied by #'process-wait and #'process-wait-with-timeout effectively ignored (because it can so rarely appear) by the IDE's processes window. %nanosleep is a low-level utility function. The equivalent Windows call (%windows-sleep) doesn't change whostate, so not changing whostate in Unixland is better for parity with Windows behavior.

Change History (1)

comment:1 Changed 4 years ago by svspire

At the moment, #'sleep is not directly changing whostate. It does so indirectly on Unix by virtue of calling #'%nanosleep, but on Windows it doesn't, because callee #'%windows-sleep doesn't do so. If this bug is fixed as suggested, should #'sleep then be changed to explicitly change whostate (to "Sleep" or some such generic name)? After all, it's an ANSI function and thus likely to be called by userspace code and thus -- probably -- it should change the whostate. The argument could also be made that changing the whostate when sleeping will be insensible when the ratio of sleeping to computing is high, for exactly the same reason I filed this bug in the first place. OTOH, when that ratio is low, it might make good sense for #'sleep to change the whostate. Hence the dilemma.

Note: See TracTickets for help on using tickets.