-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
It has two problems:
thread::sleepdoes not guarantee wakeup after the sleep time has elapsed. This is impossible to fix... but I must admit, it will tend to work fairly often.- More fixable yet more egregious is that spawning threads takes a nonzero amount of time! Even if it only consumes a few microseconds, this means that takes less than 1000 items being sorted to throw off things by an entire millisecond, which is disastrous to this sorting scheme. In reality, it takes far less, as your tests don't pass on craterbot. All threads should do something like spin on an AtomicBool so that they only commence sleeping when they are all spawned.
Metadata
Metadata
Assignees
Labels
No labels