[pcap][workaround] Avoid deadlocking on waiting on packets
[pcap][workaround] Avoid deadlocking on waiting on packets

As ReadPacketData() is called usually in loop, goroutine scheduler seems
to be not very fair when running on a 1 core CPU (GOMAXPROCS = 1 as NumCPU
= 1)
As the p.mu lock is re-acquired (on the next loop), a call to Close() have
poor chance to acquire the lock.
So the workaround is to give a chance to other goroutine waiting on a same
Mutex if pcap handler return timeout.

adriantam/gopacket,skyportsystems/gopacket,levigross/gopacket,skyportsystems/gopacket,levigross/gopacket,ross-williams/gopacket,adriantam/gopacket,xuzhaokui/gopacket,rouzier/gopacket,rouzier/gopacket,google/gopacket,skyportsystems/gopacket,google/gopacket,xuzhaokui/gopacket,vtolstov/gopacket,ross-williams/gopacket,xuzhaokui/gopacket,vtolstov/gopacket,adriantam/gopacket,vtolstov/gopacket,google/gopacket,ross-williams/gopacket,rouzier/gopacket,levigross/gopacket