Ruby/DL loaded shared libraries are blocking?

P

PierreW

Hi guys,

I am using Ruby/DL (dl/import) to load a dynamic library. It seems
that when I call a function of this library from Ruby, it is blocking.
Is it "normal", or am I doing something wrong? Is it possible to make
it non-blocking?

Thanks!
Pierre
 
R

Roger Pack

I am using Ruby/DL (dl/import) to load a dynamic library. It seems
that when I call a function of this library from Ruby, it is blocking.
Is it "normal", or am I doing something wrong? Is it possible to make
it non-blocking?

Yeah, non blocking (true multi-threading) is considered to introduce
complexity so it probably default to non true multi-thread.
I know with jruby this is (probably) not the case, and with ffi you can
set a method as non blocking, though it appears to have an annoying
syntax, and would only be non-blocking with MRI 1.9+:
http://groups.google.com/group/ruby...&q=rb_thread_blocking_region#8f3d9e93fc1025ca


-r
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Ruby/DL problem 3
Transition to 1.9 - DL/CPtr issue 0
DL Library - Ruby 1.9.2 - Windows 2
Ruby::DL vs Ruby::FFI 5
Ruby/DL and errno 0
Ruby/DL: How to create and use a buffer? 1
DL usage 0
Ruby/DL question 5

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top