aboutsummaryrefslogtreecommitdiff
path: root/ch09
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2023-09-17 15:21:40 +0200
committerJan Sucan <jan@jansucan.com>2023-09-18 14:24:36 +0200
commite66d66508aec54f8044c9a6eba517eb49f74516e (patch)
treea0cb8e39c693a74397a644bdb0cb5f720bfcc09b /ch09
parent0aa755660ea881b8f292004b1780ff677c5d2425 (diff)
9_a_1: Add solution
Diffstat (limited to 'ch09')
-rw-r--r--ch09/9_a_1.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/ch09/9_a_1.txt b/ch09/9_a_1.txt
new file mode 100644
index 0000000..0fa7bb6
--- /dev/null
+++ b/ch09/9_a_1.txt
@@ -0,0 +1,13 @@
+-- Is the order in which we call bracket and handle important? Why?
+
+-- The assignment is not completely clear. The 'bracket' function has three
+-- actions. It's not clear what the order means here. When changing the order of
+-- the 'bracket' and 'handle', 'handle' can be used in just one action or in
+-- more of them.
+--
+-- Let's assume that changing the order means moving the 'handle' call to the
+-- "use" action of the 'bracket' so that it covers that whole action.
+
+-- The order is important. When the order is changed (see the assumption above),
+-- exceptions thrown in the "acquire" and "release" actions will not be caught
+-- by the 'handle' function.