Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.993.mcz
==================== Summary ====================
Name: Kernel-eem.993
Author: eem
Time: 18 February 2016, 1:37:19.052897 pm
UUID: a151e0db-6470-4e80-8ea8-3c1bbe9282b4
Ancestors: Kernel-cmm.992
Fix Process>>isSuspended. Fix a comment typo in Process>>isTerminated. Put all Process testing methods in their own category.
=============== Diff against Kernel-cmm.992 ===============
Item was changed:
+ ----- Method: Process>>isActiveProcess (in category 'testing') -----
- ----- Method: Process>>isActiveProcess (in category 'accessing') -----
isActiveProcess
^ self == Processor activeProcess!
Item was changed:
+ ----- Method: Process>>isSuspended (in category 'testing') -----
- ----- Method: Process>>isSuspended (in category 'accessing') -----
isSuspended
+ "A process is suspended if it is waiting on some list, other than the runnable process lists."
+ | myPriority |
+ "Grab my prioirty now. Even though evaluation is strictly right-to-left, accessing Processor could involve a send."
+ myPriority := priority.
+ ^myList
+ ifNil: [false]
+ ifNotNil: [:list| list ~~ (Processor waitingProcessesAt: myPriority)]!
- ^myList isNil!
Item was changed:
+ ----- Method: Process>>isTerminated (in category 'testing') -----
- ----- Method: Process>>isTerminated (in category 'accessing') -----
isTerminated
self isActiveProcess ifTrue: [^ false].
^suspendedContext isNil
or: ["If the suspendedContext is the bottomContext it is the block in Process>>newProcess.
+ If so, and the pc is greater than the startpc, the block has alrteady sent and returned
- If so, and the pc is greater than the startpc, the bock has alrteady sent and returned
from value and there is nothing more to do."
suspendedContext isBottomContext
and: [suspendedContext pc > suspendedContext startpc]]!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.993.mcz
==================== Summary ====================
Name: Kernel-eem.993
Author: eem
Time: 18 February 2016, 1:37:19.052897 pm
UUID: a151e0db-6470-4e80-8ea8-3c1bbe9282b4
Ancestors: Kernel-cmm.992
Fix Process>>isSuspended. Fix a comment typo in Process>>isTerminated. Put all Process testing methods in their own category.
=============== Diff against Kernel-cmm.992 ===============
Item was changed:
+ ----- Method: Process>>isActiveProcess (in category 'testing') -----
- ----- Method: Process>>isActiveProcess (in category 'accessing') -----
isActiveProcess
^ self == Processor activeProcess!
Item was changed:
+ ----- Method: Process>>isSuspended (in category 'testing') -----
- ----- Method: Process>>isSuspended (in category 'accessing') -----
isSuspended
+ "A process is suspended if it is waiting on some list, other than the runnable process lists."
+ | myPriority |
+ "Grab my prioirty now. Even though evaluation is strictly right-to-left, accessing Processor could involve a send."
+ myPriority := priority.
+ ^myList
+ ifNil: [false]
+ ifNotNil: [:list| list ~~ (Processor waitingProcessesAt: myPriority)]!
- ^myList isNil!
Item was changed:
+ ----- Method: Process>>isTerminated (in category 'testing') -----
- ----- Method: Process>>isTerminated (in category 'accessing') -----
isTerminated
self isActiveProcess ifTrue: [^ false].
^suspendedContext isNil
or: ["If the suspendedContext is the bottomContext it is the block in Process>>newProcess.
+ If so, and the pc is greater than the startpc, the block has alrteady sent and returned
- If so, and the pc is greater than the startpc, the bock has alrteady sent and returned
from value and there is nothing more to do."
suspendedContext isBottomContext
and: [suspendedContext pc > suspendedContext startpc]]!
Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.303.mcz
==================== Summary ====================
Name: KernelTests-eem.303
Author: eem
Time: 18 February 2016, 1:35:19.172705 pm
UUID: b78a89cf-abb7-4432-95d9-106423fac62a
Ancestors: KernelTests-cmm.302
Add tests for isSuspended.
=============== Diff against KernelTests-cmm.302 ===============
Item was added:
+ ----- Method: ProcessTest>>testIsSuepended (in category 'tests') -----
+ testIsSuepended
+ | semaphore |
+ self deny: Processor activeProcess isSuspended.
+ semaphore := Semaphore new.
+ "This process is runnable but hasn't got to the wait yet becasue the active process is running."
+ self deny: ([semaphore wait] forkAt: Processor activePriority) isSuspended.
+ self deny: ([semaphore wait] forkAt: Processor activePriority) suspendingList == semaphore.
+ "This one does get to run because, being higher priority it preempts the active process until it waits on the semaphore.".
+ self assert: ([semaphore wait] forkAt: Processor activePriority + 1) isSuspended.
+ self assert: ([semaphore wait] forkAt: Processor activePriority + 1) suspendingList == semaphore!
Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.303.mcz
==================== Summary ====================
Name: KernelTests-eem.303
Author: eem
Time: 18 February 2016, 1:35:19.172705 pm
UUID: b78a89cf-abb7-4432-95d9-106423fac62a
Ancestors: KernelTests-cmm.302
Add tests for isSuspended.
=============== Diff against KernelTests-cmm.302 ===============
Item was added:
+ ----- Method: ProcessTest>>testIsSuepended (in category 'tests') -----
+ testIsSuepended
+ | semaphore |
+ self deny: Processor activeProcess isSuspended.
+ semaphore := Semaphore new.
+ "This process is runnable but hasn't got to the wait yet becasue the active process is running."
+ self deny: ([semaphore wait] forkAt: Processor activePriority) isSuspended.
+ self deny: ([semaphore wait] forkAt: Processor activePriority) suspendingList == semaphore.
+ "This one does get to run because, being higher priority it preempts the active process until it waits on the semaphore.".
+ self assert: ([semaphore wait] forkAt: Processor activePriority + 1) isSuspended.
+ self assert: ([semaphore wait] forkAt: Processor activePriority + 1) suspendingList == semaphore!
Chris Muller uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-cmm.302.mcz
==================== Summary ====================
Name: KernelTests-cmm.302
Author: cmm
Time: 18 February 2016, 3:13:16.415274 pm
UUID: 8a12624b-2c8a-4685-846f-b70f05dae4da
Ancestors: KernelTests-eem.301
Added test for Date today requirement.
=============== Diff against KernelTests-eem.301 ===============
Item was added:
+ ----- Method: TimespanTest>>testDateToday (in category 'testing') -----
+ testDateToday
+ self assert: Date today start offset isZero!
Chris Muller uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-cmm.302.mcz
==================== Summary ====================
Name: KernelTests-cmm.302
Author: cmm
Time: 18 February 2016, 3:13:16.415274 pm
UUID: 8a12624b-2c8a-4685-846f-b70f05dae4da
Ancestors: KernelTests-eem.301
Added test for Date today requirement.
=============== Diff against KernelTests-eem.301 ===============
Item was added:
+ ----- Method: TimespanTest>>testDateToday (in category 'testing') -----
+ testDateToday
+ self assert: Date today start offset isZero!