Whilst that would work fine in JRuby, non-ruby callbacks in CRuby are best described as "delicate" (ie. they work, but avoid that scenario if you can).
You can also mark a ruby method as 'blocking' (tag it with @blocking = true before the attach_function call), so you could call libevent from ruby without blocking the interpreter, but once again, on CRuby, (mainly 1.8.x), it is not recommended.