Files
mercury/tests/hard_coded/io_globals_deadlock.exp
Julien Fischer 42c5c05edf Fix a potential deadlock with the recently added library predicate
Estimated hours taken: 3
Branches: main

Fix a potential deadlock with the recently added library predicate
io.update_globals/3.

library/io.m:
	If the closure passed to io.update_globals/3 throws an exception then
	we need to release the lock associated with the globals before
	propagating the exception upwards.  Failing to do so means that the
	any subsequent call to io.{set,get,update}_globals will block
	indefinitely.

tests/hard_coded/Mmakefile:
tests/hard_coded/io_globals_deadlock.{m,exp}:
	Test case for the above.
2006-08-31 04:12:21 +00:00

3 lines
58 B
Plaintext

update_pred_1 threw exception.
Final value of Globals = 3