in reply to Re^3: Problem using threads and snmp
in thread Problem using threads and snmp

Hello BrowserUK, Thank you for your reply. The error that states is a timeout. What i'm going to try to do is a unique method for all threads . This method will create the snmpsession and do the snmpget. Of course i will have to lock the access to this method. I will keep you posted. Cheers.

Replies are listed 'Best First'.
Re^5: Problem using threads and snmp
by NetWallah (Canon) on Apr 16, 2008 at 16:51 UTC
    ... . Of course i will have to lock the access to this method ..
    Wouldn't that defeat the purpose of running the threads in parallel ?

    I'm uncomfortable with your implementation of the locking to obtain and send data. Subtle bugs in this type code are notoriously difficult to notice/find/fix. My preference would be to use Thread::Queue, which will do all that for you, and probably simplify your main loop considerably. (The sample code, again).

         "How many times do I have to tell you again and again .. not to be repetitive?"

Re^5: Problem using threads and snmp
by BrowserUk (Patriarch) on Apr 16, 2008 at 15:33 UTC