Skip to content

Commit

Permalink
Merge pull request #18 from GsDevKit/dev
Browse files Browse the repository at this point in the history
1.0.2 release
  • Loading branch information
dalehenrich committed Jan 12, 2015
2 parents a04be13 + a312674 commit b5755dc
Show file tree
Hide file tree
Showing 81 changed files with 254 additions and 80 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
server compat
local server compat
port
^ self defaultPortOrResourceNameList first
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
server compat
local server compat
restart
self scriptLogEvent: '-->>Interactive restart ' , self name object: self.
self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
server compat
local server compat
start
self interactiveStartServiceOn: 'instance' transactionMode: #'manualBegin'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
server compat
local server compat
stop
self scriptLogEvent: '-->>Interactive stop ' , self name object: self.
self basicServerProcess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"gemServerName" : "dkh 12/23/2014 13:28",
"runTest:client:task:" : "dkh 01/01/2015 11:17",
"scheduledTaskList" : "dkh 12/26/2014 18:17",
"setUp" : "dkh 12/26/2014 14:47",
"setUp" : "dkh 01/09/2015 17:20",
"startGems:" : "dkh 12/23/2014 13:04",
"stopGems:" : "dkh 12/23/2014 15:53",
"taskList100" : "dkh 01/02/2015 09:20",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "dkh 12/30/2014 12:46",
"commentStamp" : "",
"instvars" : [
],
"name" : "GemServerRemoteServerParallelProcessingExampleTests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "dkh 12/30/2014 12:46",
"commentStamp" : "",
"instvars" : [
],
"name" : "GemServerRemoteServerSerialProcessingExampleTests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "dkh 12/31/2014 20:50",
"commentStamp" : "",
"instvars" : [
],
"name" : "GemServerRemoteTaskParallelProcessingExample",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "dkh 12/31/2014 20:51",
"commentStamp" : "",
"instvars" : [
],
"name" : "GemServerRemoteTaskSerialProcessingExample",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"instance" : {
"gemServerName" : "dkh 01/02/2015 11:10",
"runTest:" : "dkh 01/02/2015 11:45",
"setUp" : "dkh 01/02/2015 14:45",
"setUp" : "dkh 01/09/2015 17:20",
"startGems:" : "dkh 01/02/2015 11:11",
"stopGems:" : "dkh 01/02/2015 11:11",
"tearDown" : "dkh 01/06/2015 13:42",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
basicTransactionReentry: aBlock
basicTransactionReentry value: aBlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
basicTransactionReentry
basicTransactionReentry value
ifNil: [ basicTransactionReentry value: self reentryAllowed ].
^ basicTransactionReentry value
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
transactions-support
doBasicTransaction: aBlock
"I do an unconditional commit.
"I do an unconditional commit and I am not reentrant
If running in manual transaction mode, the system will be outside of transaction upon
returning.
Return true, if the transaction completed without conflicts.
Expand All @@ -9,14 +9,15 @@ doBasicTransaction: aBlock

self transactionMutex
critical: [
| commitResult |
| commitResult oldValue |
self basicTransactionReentry value: 'doBasicTransaction:'. "throw error upon reentry"
oldValue := self basicTransactionReentry.
[
System inTransaction
ifTrue: [ aBlock value ]
ifFalse: [
self doBeginTransaction.
aBlock value ] ]
self basicTransactionReentry: self reentryDisallowed.
self doBeginTransaction.
aBlock value ]
ensure: [
"workaround for Bug 42963: ensure: block executed twice (don't return from ensure: block)"
commitResult := self doCommitTransaction ].
commitResult := self doCommitTransaction.
self basicTransactionReentry: oldValue ].
^ commitResult ]
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ initialize
transactionMode := #'manualBegin'.
enableCreateContinuations := true.
basicServerProcess := TransientValue value: nil.
basicTransactionReentry := TransientStackValue value: nil.
self initCrashLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
server specialization
isRunning
^self serverClass isRunning
^self serverClass isRunning
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
private
logControlEvent: label
self doTransaction: [ (ObjectLogEntry info: label object: self) addToLog ]
| eventBlock |
eventBlock := [ (ObjectLogEntry info: label object: self) addToLog ].
System inTransaction
ifTrue: [ eventBlock value ]
ifFalse: [ self doTransaction: eventBlock ]
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ accessing
name

name == nil ifTrue: [ ^self serverClass name ].
^name
^name
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
private
reentryAllowed
^ [ :methodName | ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
private
reentryDisallowed
^ [ :methodName | self error: methodName , ' is not re-entrant' ]
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
private
scriptLogEvent: label object: anObject
"object log and transcript entries wanted"
"object log"

| eventBlock |
Transcript
cr;
show: 'scriptLogEvent: ' , label printString.
self doTransaction: [ (ObjectLogEntry info: label object: anObject) addToLog ]
eventBlock := [ (ObjectLogEntry info: label object: anObject) addToLog ].
System inTransaction
ifTrue: [ eventBlock value ]
ifFalse: [ self doTransaction: eventBlock ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
local server compat
start
self interactiveStartServiceOn: self portOrResourceNameList first
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"basicServerOn:" : "dkh 01/03/2015 15:54",
"basicServerProcess" : "dkh 01/02/2015 17:13",
"basicServerProcess:" : "dkh 01/02/2015 17:13",
"basicTransactionReentry" : "dkh 01/09/2015 14:20",
"basicTransactionReentry:" : "dkh 01/09/2015 13:16",
"bounceServerAfterSetOrClearBreakpoints:" : "dkh 12/09/2014 14:12",
"bounceServerForBreakpointHandling" : "dkh 12/10/2014 14:48",
"clearAllBreakpoints:" : "dkh 12/07/2014 18:24",
Expand All @@ -26,7 +28,7 @@
"defaultPortOrResourceNameList" : "dkh 01/06/2015 15:21",
"defaultScriptBinDirPath" : "dkh 11/29/2014 20:08",
"doAbortTransaction" : "dkh 12/22/2014 11:24",
"doBasicTransaction:" : "dkh 12/30/2014 07:19",
"doBasicTransaction:" : "dkh 01/09/2015 13:19",
"doBeginTransaction" : "dkh 12/22/2014 11:24",
"doCommitTransaction" : "dkh 12/22/2014 11:24",
"doInteractiveModePass:" : "dkh 12/31/2014 21:21",
Expand Down Expand Up @@ -74,14 +76,14 @@
"gemServerTransaction:onConflict:" : "dkh 12/30/2014 16:56",
"handleGemServerException:" : "dkh 12/30/2014 13:59",
"initCrashLog" : "dkh 12/25/2014 08:06",
"initialize" : "dkh 01/06/2015 15:28",
"initialize" : "dkh 01/09/2015 14:21",
"interactiveMode" : "dkh 12/22/2014 12:55",
"interactiveMode:" : "dkh 12/22/2014 12:57",
"interactiveStartServiceOn:" : "dkh 01/06/2015 15:51",
"interactiveStartServiceOn:transactionMode:" : "dkh 01/06/2015 15:50",
"isRunning" : "SebastianHeidbrink 11/02/2014 15:00",
"isValidName:" : "dkh 11/26/2014 18:31",
"logControlEvent:" : "dkh 12/30/2014 07:24",
"logControlEvent:" : "dkh 01/09/2015 17:16",
"logDebug:" : "dkh 12/07/2014 10:09",
"logInfo:" : "dkh 12/07/2014 10:09",
"logStack:titled:" : "dkh 12/27/2014 12:22",
Expand All @@ -94,11 +96,13 @@
"ports" : "dkh 01/07/2015 10:02",
"ports:" : "dkh 01/07/2015 10:02",
"recordGemPid:" : "dkh 12/04/2014 06:56",
"reentryAllowed" : "dkh 01/09/2015 13:12",
"reentryDisallowed" : "dkh 01/09/2015 13:11",
"register" : "dkh 01/06/2015 13:39",
"restartGems" : "dkh 12/06/2014 13:04",
"saveContinuationFor:titled:inTransactionDo:" : "dkh 12/30/2014 07:25",
"scriptBinDirPath" : "dkh 11/29/2014 09:44",
"scriptLogEvent:object:" : "dkh 12/30/2014 07:25",
"scriptLogEvent:object:" : "dkh 01/09/2015 17:18",
"scriptServicePrologOn:" : "dkh 01/03/2015 22:10",
"scriptStartServiceOn:" : "dkh 01/06/2015 15:50",
"serverClass" : "dkh 11/29/2014 14:08",
Expand All @@ -112,6 +116,7 @@
"setOrClearBreakpoint:" : "dkh 12/07/2014 18:24",
"setStatmonCacheName" : "dkh 11/30/2014 08:45",
"stackReportLimit" : "dkh 12/30/2014 06:46",
"start" : "dkh 01/09/2015 14:16",
"startBasicServerOn:" : "dkh 01/06/2015 15:53",
"startGems" : "dkh 01/06/2015 15:29",
"startScriptName" : "dkh 12/04/2014 08:02",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"name",
"serverClassAssoc",
"serverInstance",
"ports",
"portOrResourceNameList",
"enableRemoteBreakpoints",
"transactionMode",
"interactiveMode",
"crashLog",
"enableCreateContinuations",
"gemServerExceptionSet",
"basicServerProcess" ],
"basicServerProcess",
"basicTransactionReentry" ],
"name" : "GemServer",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
block: anObject

block := anObject
block := anObject
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
nativeProcess: anObject

nativeProcess := anObject
nativeProcess := anObject
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
nativeProcess

^nativeProcess
^nativeProcess
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
nativeSemaphore: anObject

nativeSemaphore := anObject
nativeSemaphore := anObject
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
portableProcess: anObject

portableProcess := anObject
portableProcess := anObject
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
portableProcess

^portableProcess
^portableProcess
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
portableSemaphore: anObject

portableSemaphore := anObject
portableSemaphore := anObject
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
gem server querying
gemServerNamed: aString
^self singleton serverNamed: aString
^self singleton serverNamed: aString
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
gem server querying
gemServerNames
^self singleton names asSortedCollection
^self singleton names asSortedCollection
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
instance creation
new
^self singleton
^self singleton
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
registration
removeGemServerNamed: aName
self singleton removeServer: aName
.
.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
gem server querying
serverGems
^self singleton servers
^self singleton servers
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
gem server querying
serversOnPort: aPortNumber
^self singleton serversOnPort: aPortNumber
^self singleton serversOnPort: aPortNumber
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ accessing
singleton

Singleton isNil ifTrue: [self initSingleton].
^Singleton
^Singleton
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ addServer: aServer
(self serverNamed: aServer name) notNil
ifTrue: [^Error error: 'Server with that name already exists!'].

self servers add: aServer
self servers add: aServer
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
other
names

^self servers collect:[:each | each name].
^self servers collect:[:each | each name].
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ other
removeServer: aName
|server|
server :=self serverNamed:aName.
server == nil ifFalse:[ servers remove: server]
server == nil ifFalse:[ servers remove: server]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
other
serverClasses

^self servers collect:[:each | each serverClass].
^self servers collect:[:each | each serverClass].
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
other
serverNamed: aString
^self servers detect:[:each | each name = aString] ifNone:[nil]
^self servers detect:[:each | each name = aString] ifNone:[nil]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
other
servers
^servers
^servers
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
other
serversOfClass: aClassName
^servers select: [:each | each serverClass name = aClassName]
^servers select: [:each | each serverClass name = aClassName]
Loading

0 comments on commit b5755dc

Please sign in to comment.