The PePuRunner class creates a new lock for each instance in the __init__ so it won't really protect two different instances accessing the resources at the same time. This could be a problem if two different events are being handled at the same time.