--mimepart_4d4115fd1e976_59895ba5b30294
Content-Type: text/plain
Content-Transfer-Encoding: Quoted-printable
Content-Disposition: inline

Feature #4328: export rb_thread_call_with_gvl()
http://redmine.ruby-lang.org/issues/show/4328

Author: Eric Wong
Status: Open, Priority: Normal
Category: core, Target version: 1.9.3

I think it is general enough to remain supported along
with the rest of the MRI C API, especially since
rb_thread_blocking_region() exists and is supported.

It's useful for interacting with certain C libraries that expect a
user-supplied callback function so the extension can allocate a Ruby
object inside the callback.

It can also be easily made a no-op for Ruby implementations without a
GVL.


----------------------------------------
http://redmine.ruby-lang.org

--mimepart_4d4115fd1e976_59895ba5b30294
Content-Type: text/x-diff; name=0001-export-rb_thread_call_with_gvl.patch
Content-Transfer-Encoding: Base64
Content-Disposition: attachment; filename=0001-export-rb_thread_call_with_gvl.patch

RnJvbSA4ZGMxNjNiM2I2NWZiMWJmODNkYTk1MTY5YmZmOWI4NWQ5OGQ1MGFk
IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBFcmljIFdvbmcgPG5v
cm1hbHBlcnNvbkB5aGJ0Lm5ldD4KRGF0ZTogVGh1LCAyNyBKYW4gMjAxMSAw
NjoyMjoxOCArMDAwMApTdWJqZWN0OiBbUEFUQ0hdIGV4cG9ydCByYl90aHJl
YWRfY2FsbF93aXRoX2d2bCgpCgpJdCBpcyBhIHVzZWZ1bCBtZXRob2QgaW4g
QyBleHRlbnNpb25zIHN1Y2ggYXMgZGF0YWJhc2UKdGhhdCB0YWtlcyBhIGNh
bGxiYWNrICh3aGVyZSBJIG5lZWQgdG8gYWxsb2NhdGUgYSBSdWJ5CnN0cmlu
ZykgaW5zaWRlIGEgYmxvY2tpbmcgcmVnaW9uLgotLS0KIGluY2x1ZGUvcnVi
eS9pbnRlcm4uaCB8ICAgIDEgKwogdm1fY29yZS5oICAgICAgICAgICAgIHwg
ICAgMSAtCiAyIGZpbGVzIGNoYW5nZWQsIDEgaW5zZXJ0aW9ucygrKSwgMSBk
ZW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