pycap does not release the GIL and thus if the pycap.capture call is called inside a thread, the whole program is stuck while executing the thread. I've done a small change in the code so that the GIL is released while waiting for a package. The change starts from line 115 of the capture.c file. Here is the cnaged piece of code:
packet = (u_char *) pcap_next(self->pcap, &header);
You can find the changed file applied to this description
Log in to post a comment.