We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3180902 commit 72db154Copy full SHA for 72db154
repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/write.duringTransactionOn..st
@@ -0,0 +1,16 @@
1
+request handling
2
+write: response duringTransactionOn: stream
3
+ | commitResult |
4
+ System inTransaction
5
+ ifTrue: [
6
+ "We already are in a transaction, so just write the response"
7
+ response writeOn: stream.
8
+ ^ true ]
9
+ ifFalse: [
10
+ [
11
+ System beginTransaction.
12
+ response writeOn: stream ]
13
+ ensure: [
14
+ "workaround for Bug 42963: ensure: block executed twice (don't return from ensure: block)"
15
+ commitResult := System commitTransaction ] ].
16
+ ^ commitResult
0 commit comments