Thanks for the help.

Right now, I'm starting to doubt that the pcap gem is done properly
(and seeing how it was apparently written for Ruby 1.4, there's likely
some pretty antique proper stuff in there as well). The sections that
were going outside the GIL are yielding values back to the VM, so that
results in a failure as most of the internal API is no-go inside a
blocking region, and effectively the callback handler would need to re-
acquire the lock for the yield call.

I'll see if I can find the time to play with that more, but right now
I'm running into quite massive performance issues with scripting
languages, as I need to do a non-trivial amount of number-crunching,
so I guess I'll have to go back to C++ for the time being. (That's
"<1min vs. hours to days" performance issues, basically I'm beating
the integer pipeline silly which is still the area of optimising
compilers.)

On Sep 27, 3:09 pm, Dirkjan Bussink <[email protected]> wrote:
> You can use regular extconf.rb detection mechanisms to check whether
> rb_thread_blocking_region is available, so that's definitely the
> preferred way to go. You should check how various other projects to
> method detection. You can use something very simple like the
> following:
>
> have_func('rb_thread_blocking_region')

On the upside, things seem to Just Work with have_func(), which is a
nice improvement over my hack.

-- 
--- !ruby/object:MailingList
name: rubinius-dev
view: http://groups.google.com/group/rubinius-dev?hl=en
post: [email protected]
unsubscribe: [email protected]

Reply via email to