File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed
repository/Grease-GemStone-Core.package/GRGemStonePlatform.class Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 1- transactions
1+ * grease - gemstone - core
22doTransaction: aBlock
33 " Evaluate aBlock in a transaction.
44 Return true if the transaction succeeds and false if the transaction fails.
55 Nested calls are allowed and will always return true.
66 See System class>>transactionConflicts for dealing with failed transactions."
77
8- System inTransaction
9- ifTrue: [ " We alread in a transaction, so just evaluate the block"
10- aBlock value.
11- ^ true ].
8+ " Ensure that each block evaluation is mutually exclusive: https://code.google.com/p/glassdb/issues/detail?id=355"
129 self transactionMutex critical: [
1310 " Get the transactionMutex, and perform the transaction."
14- [
15- self doBeginTransaction.
16- aBlock value.
17- ] ensure : [
18- ^ self doCommitTransaction]].
11+ System inTransaction
12+ ifTrue: [ " We already are in a transaction, so just evaluate the block"
13+ aBlock value.
14+ ^ true ]
15+ ifFalse: [
16+ [
17+ self doBeginTransaction.
18+ aBlock value
19+ ] ensure : [ ^ self doCommitTransaction]]]
20+
Original file line number Diff line number Diff line change 1515 "doAbortTransaction" : " dkh 11/06/2009 08:41" ,
1616 "doBeginTransaction" : " dkh 11/06/2009 08:41" ,
1717 "doCommitTransaction" : " dkh 11/06/2009 08:41" ,
18- "doTransaction:" : " dkh 11/06/2009 08:41 " ,
18+ "doTransaction:" : " JohanBrichau 03/21/2014 17:45 " ,
1919 "ensureExistenceOfFolder:" : " DaleHenrichs 12/03/2010 16:28" ,
2020 "filesIn:" : " DaleHenrichs 09/02/2010 15:45" ,
2121 "isProcessTerminated:" : " dkh 11/06/2009 08:41" ,
You can’t perform that action at this time.
0 commit comments