4 ms·
You're not addressing the point about shared data. How do I program my Celery tasks to operate safely on shared data? Well, I need a system that is responsible
by garethrees 10y ago
You're not addressing the point about shared data. How do I program my Celery tasks to operate safely on shared data?
Well, I need a system that is responsible for maintaining the shared data, and I have to program my tasks to send it queries and updates, and receive the results, and so probably I'm going to need serializers and deserializers for all my data structures, and if the tasks have transactions (which they almost certainly do) then I'm going to have to implement locks to maintain the data integrity. Whatever it is, this system looks a lot like a database.
Whereas with coroutines each task just updates ordinary data structures in memory. No need for communication, queries, serialization, or locks.