Thats what I thought, but it doesnt work that way. In the
implimentation of the SNMP++ library, they use several global
queues...the problem was one thread would pull something out of the
global queue and start processing it, then another thread would get the
same item and while it was using it, the first thread would delete
it...this causeing a segmentation fault. I "fixed" the problem by
adding the thread id to each item added to the queue and then do a
check to ensure that only the thread that added the item can remove
it. This works for my particular application (this time). I only ran
into this problem when trying to process a large number of SNMP gets at
the same time.
Thanks for your reply
> Hi Bret,
> if you create a SNMP++ session within each thread, you do not have
> to lock anything. This may not be the best solution, if you have
> many threads or many dynamically created threads, because each session
> does take its own UDP port and binding a port takes a while.
Sent via Deja.com http://www.deja.com/
Before you buy.