scipp / beamlime

Live data reduction visualisation for ESS
https://scipp.github.io/beamlime/
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Message router handle stops before it raises. #166

Closed YooSunYoung closed 6 months ago

YooSunYoung commented 6 months ago

Once coroutines are created, it is no longer bound to each other. Therefore, raising an error in one of coroutines won't stop other coroutines to stop. Therefore we need to make sure Application.Stop is handled before the message handlers raise any errors.

Or we can also have a safety net in the coroutine to check if any tasks are failed...? I don't know... Currently handling Applicaiton.Stop before raising an error was sufficient, and was tested in #165

The reason is explained in the comment of the code as well.