[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Clarrification about "trap"

Shamika Ariyawansa

2/2/2009 7:10:00 PM

Hi,
I know in ruby we use "trap" command to handle OS signals while passing
the signal and the proc object as parameters respectively. when i call
this trap function before any infinite loop it does work perfectly.
Means it listens to the keybord signals and do as i want. But the
problem i have is that im not clear about the way it works... In c++ we
use separate thread to listen for signals and use another thread to run
the program. Is the same scenario happens here with trap
function???..... Please give me a clarification

Thanx in advance
Shamika
--
Posted via http://www.ruby-....