Closed zoranbosnjak closed 3 years ago
A problem is the same on req-3.4.0.
@simonmar
I am not sure where the problem is, but it looks like it's related to async
. A function reqBr
is doing some magic with AsyncExceptions (which I don't understand):
https://hackage.haskell.org/package/req-3.4.0/docs/src/Network.HTTP.Req.html#reqBr
But nevertheless, how is it possible for AsyncCancelled
(which is generated by the race
function) to escape to the main
function?
Can you please tell what is going on?
Is there a way to workaround the problem within the example program?
As I told you elsewhere, I do not have enough free time these days to debug user's programs. On the surface though, it looks like something async
-related.
I need to restart periodic http polling on every configuration change. In reality, the configuration changes come from GUI actions (via STM). For the purpose of this test, I am simulating the changes.
The following minimal example does not behave as expected. The program is suppose to run forever, but instead it terminates after a few seconds. It looks like the problem is related to canceling
runReq
.I am not sure if the problem is with
async
orreq
or I am maybe misusing something.Where
test.hs
is: