Message413962
Here is one another story.
When handling message queues in distributed applications, I use the following pattern frequently for graceful shutdown:
* Use a sentinel object to signal the end of queue.
* Enqueue the sentinel object when:
- The server is shutting down. (i.e., cancelled explicitly)
- The connection peer has sent an explicit termination message. (e.g., EOF)
* Wait until all enqueued messages before the sentinal object to be processed.
- I'd like to impose a shutdown timeout on here using a persistent task group, by spawning all handler tasks of this queue into it. |
|
Date |
User |
Action |
Args |
2022-02-25 05:04:59 | achimnol | set | recipients:
+ achimnol, gvanrossum, asvetlov, yselivanov |
2022-02-25 05:04:59 | achimnol | set | messageid: <1645765499.3.0.500657684064.issue46843@roundup.psfhosted.org> |
2022-02-25 05:04:59 | achimnol | link | issue46843 messages |
2022-02-25 05:04:59 | achimnol | create | |
|