I'm wondering whether the listener methods that respond to Django signals execute sequentially or concurrently. Essentially, is this:
for object_instance in object_instance_list:
custom_signal.connect(object_instance.method)
custom_signal.send(self)
Different than this:
for object_instance in object_instance_list:
object_instance.method()
edit: Made a syntactical correction to the code
You could have just read the code FWIW - Django is open source. But anyway:
To make a long story short : signals are mainly used to allow loose coupling between applications. If you want concurrent execution, you either have to use threads or subprocesses (which might not be safe depending on the execution environment) or go for something like celery.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With