What are the differences for interrupts handling between Leonardo and Yun?

Hi all,
I am aksing this as I am trying to setup a small robot wich should receive text commands for its movements via wifi (using console). It uses encoders to control the amplitude of the movements. The problem is that if I include the encoder library I choose (which worked AFAIR with a Leonardo), I get garbled messages via the console.
If I comment out the include of the encoder library (which is interrupt driven, hence my question), everything works fine.
More specifically: I use the a process to run a shell command (a script to get the IP address) and process its output to send the IP address via Serial in case I am on a network I cant control. Without the encoder library I get a normal output from the shell commands, if I include the library, the shell output comes in totally garbled: missing chars, too long string...
So my question is: where can I find what can be done using interrupts on the Yun without getting these kinds of troubles (pretty hard to debug).
TIA