--ldf+wvohOdFqHHPxqGS
Content-Type: multipart/mixed; boundary="=-DbyEpUGh7B7bNSAr2VNQ"


--
byEpUGh7B7bNSAr2VNQ
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Sun, 2007-02-11 at 07:00 +0900, Akinori MUSHA wrote:
> If you find any compatibility problems or unexpected behavior with the
> new implementation, please let me know.

The version of fastthread which was merged doesn't handle interrupted
waits correctly, which can result in an rb_bug().

Please see Ruby bug #8663:

http://rubyforge.org/tracker/index.php?func=detail&aid=8663&group_id=426&atid=1698

A patch to fix the issue is attached (also posted to the bug tracker).

-mental


--
byEpUGh7B7bNSAr2VNQ
Content-Description:
Content-Disposition: inline; filename=fastthread-wait-fix.diff
Content-Transfer-Encoding: base64
Content-Type: text/x-patch; charset=UTF-8

SW5kZXg6IGV4dC90aHJlYWQvdGhyZWFkLmMNCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCi0tLSBleHQvdGhyZWFkL3Ro
cmVhZC5jCShyZXZpc2lvbiAxMTc0NCkNCisrKyBleHQvdGhyZWFkL3RocmVhZC5jCSh3b3JraW5n
IGNvcHkpDQpAQCAtMTMyLDYgKzEzMiwxOCBAQA0KICAgICB9DQogfQ0KIA0KK3N0YXRpYyB2b2lk
DQorcmVjeWNsZV9lbnRyaWVzKExpc3QgKmxpc3QsIEVudHJ5ICpmaXJzdF9lbnRyeSwgRW50cnkg
Kmxhc3RfZW50cnkpDQorew0KKyNpZmRlZiBVU0VfTUVNX1BPT0xTDQorICAgIGxhc3RfZW50cnkt
Pm5leHQgPSBsaXN0LT5lbnRyeV9wb29sOw0KKyAgICBsaXN0LT5lbnRyeV9wb29sID0gZmlyc3Rf
ZW50cnk7DQorI2Vsc2UNCisgICAgbGFzdF9lbnRyeS0+bmV4dCA9IE5VTEw7DQorICAgIGZyZWVf
ZW50cmllcyhmaXJzdF9lbnRyeSk7DQorI2VuZGlmDQorfQ0KK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F9saXN0KCZhcmdzLT5jb25kdmFyLT53YWl0aW5nLCBy
Yl90aHJlYWRfY3VycmVudCgpKTsNCi0gICAgcmJfdGhyZWFkX3N0b3AoKTsNCisgICAgd2FpdF9s
aXN0KCZhcmdzLT5jb25kdmFyLT53YWl0aW5nKTsNCiAgICAgcmJfZnVuY2FsbChhcmdzLT5tdXRl
eCwgcmJfaW50ZXJuKCJsb2NrIiksIDApOw0KICAgICByZXR1cm4gUW5pbDsNCiB9DQo--
byEpUGh7B7bNSAr2VNQ--

--ldf+wvohOdFqHHPxqGS
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQBF0427SuZBmZzm14ERAhy1AKCzDU+yywf1aB7YAoCBsaumbuQbdQCfZ/mo
rS9U4LBcZv5/mxls2AwIbzMt
-----END PGP SIGNATURE-----

--ldf+wvohOdFqHHPxqGS--