[Cuis-dev] BaseImageTests for 5302

ken.dickey at whidbey.com ken.dickey at whidbey.com
Thu Jun 23 14:57:29 PDT 2022


On 2022-06-23 08:31, Juan Vuletich wrote:
..
> Nope. #valueWithin:onTimeout: should work correctly if processes are
> preempted. It actually uses process preemption to do its job (see the
> implementation).
> 
> The only (non-) problem here is that on the Sipeed Lichee RV,
> #valueWithin:onTimeout: takes a bit longer to do its job. I just want
> to give it this little extra time. That's why I'm asking you for an
> appropriate timeout value.

In a workspace [LicheeRV Dock]:

  [1000 milliseconds asDelay wait] valueWithin: 100 milliSeconds 
onTimeout: [] ]
    durationToRun.
   -> 0:00:00:00:102   [102 milliseconds]

  [ [ [5 seconds asDelay wait] valueWithin:100 milliseconds onTimeout: [] 
]
    valueWithIn: 500 milliseconds onTimeOut: [] ] durationToRun.
   -> 0:00:00:00:104   [104 milliseconds]

The preemptions can only happen during #durationToRun, right?  Between 
getting the start time, running the block, and getting the end time.

This is why running the tests uninterruptedly (e.g. Cmd-t in a browser) 
pass and running in background fails.

I think that giving extra time for #durationToRun in background is 
testing the wrong thing.

$0.02,
-KenD


More information about the Cuis-dev mailing list