Event and blocking

Since the Eventlet uses green threading and asynchronous I / O, do I still need to set locks before accessing objects? My understanding is that green mushrooms are part of the same thread and no blocking is needed. Can anyone confirm or deny this?

+2


a source to share


1 answer


Your understanding is correct: "green" streams are not actually streams, they do not receive preliminary omission at unpredictable points (especially "not in the middle" of an operation), so you have complete control over the execution being removed from one (and thus can be sent to another), and can save problems / overhead on lock capture / release operations.



+5


a source







All Articles