[threads] Correct the spin waiting in 'sleep_interruptable' (#3544)
authorEmil Sandstø <emilalexer@hotmail.com>
Mon, 12 Sep 2016 10:19:00 +0000 (12:19 +0200)
committerLudovic Henry <ludovic@xamarin.com>
Mon, 12 Sep 2016 10:19:00 +0000 (12:19 +0200)
commit5a4a9a0e8ab62ae653be2ea09e5dfcac6702cc60
tree24e918ba915406861aba27e5633854f89d8a1a00
parent0a0be23e6f4f449872e9a39194ad157e96e5a0f2
[threads] Correct the spin waiting in 'sleep_interruptable' (#3544)

After https://github.com/mono/mono/commit/089c47f1c07bf250d76c36e04675569fc6f5b4ba#diff-e7e458b6256eaa730c145f14a666652aR1141
the code started to use nanoseconds instead of milliseconds. The problem was that this caused 'sleep_interruptable' to spin wait the last millisecond before the wait was over, https://bugzilla.xamarin.com/show_bug.cgi?id=44132.

Fix https://bugzilla.xamarin.com/show_bug.cgi?id=44132
mono/utils/mono-threads.c