Skip to content

Commit

Permalink
Merge pull request #27 from sbragagnolo/dev-0.3
Browse files Browse the repository at this point in the history
Release v0.3
  • Loading branch information
guillep committed Aug 9, 2017
2 parents 45fe1b7 + 7056b0d commit cf80bfe
Show file tree
Hide file tree
Showing 409 changed files with 2,061 additions and 902 deletions.
7 changes: 5 additions & 2 deletions .filetree
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
{"packageExtension" : ".package",
"propertyFileExtension" : ".json" }
{
"packageExtension" : ".package",
"propertyFileExtension" : ".json",
"noMethodMetaData" : true
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*~
Pharo*
pharo*
*.zip
*-cache
*.dmp
14 changes: 14 additions & 0 deletions .smalltalk.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'TaskIt',
#directory : '',
#platforms : [ #pharo ]
}
],
#testing : {
#include : {
#packages : [ 'TaskIt.*' ]
}
}
}
26 changes: 8 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
language: c

addons:
apt:
packages:
- lib32asound2
- lib32z1
- lib32bz2-1.0
- libssl1.0.0:i386
- libfreetype6:i386

install:
- wget -O - get.pharo.org/60+vm | bash
- ./scripts/install-packages.sh

script:
- ./pharo Pharo.image test --no-xterm --fail-on-failure "TaskIt.*"

language: smalltalk
sudo: false

os:
- linux
- osx

smalltalk:
- Pharo-5.0
- Pharo-6.0
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,25 @@ baseline: spec
do: [ spec
package: #TaskIt;
package: #'TaskIt-Tests' with: [ spec requires: #('TaskIt') ];

package: #TaskItRetry with: [ spec requires: #('TaskIt') ];
package: #'TaskItRetry-Tests' with: [ spec requires: #('TaskItRetry') ];

package: #TaskItServices with: [ spec requires: #('TaskIt') ];
package: #'TaskItServices-Tests' with: [ spec requires: #('TaskItServices') ];

package: #TaskItProcesses with: [ spec requires: #('TaskIt') ];
package: #'TaskItProcesses-Tests' with: [ spec requires: #('TaskItProcesses') ];
package: #TaskItBrowser with: [ spec requires: #('TaskItProcesses') ].
spec group: 'minimal' with: #(#TaskIt) ]

package: #TaskItBrowser with: [ spec requires: #('TaskItProcesses') ];

package: #TaskItDebugger with: [ spec requires: #('TaskItProcesses') ];
package: #'TaskItDebugger-Tests' with: [ spec requires: #('TaskItDebugger') ].

spec
group: 'minimal' with: #('TaskIt');
group: 'default' with: #('minimal' 'TaskItProcesses' 'TaskItRetry' 'TaskItServices');
group: 'debug' with: #('minimal' 'TaskItDebugger');
group: 'tests' with: #('default' 'TaskIt-Tests' 'TaskItRetry-Tests' 'TaskItServices-Tests'
'TaskItProcesses-Tests' 'TaskItDebugger-Tests');
group: 'development' with: #('default' 'debug' 'tests') ]
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"instance" : {
"baseline:" : "SantiagoBragagnolo 8/23/2016 17:45"
"baseline:" : "MaxLeske 12/30/2016 17:58"
},
"class" : {
"load" : "SantiagoBragagnolo 6/17/2016 13:48:21",
"catalogDescription" : "SantiagoBragagnolo 6/17/2016 13:48:21",
"baseConfigurationClassIfAbsent:" : "SantiagoBragagnolo 6/17/2016 13:48:21",
"DevelopmentSupport" : "SantiagoBragagnolo 6/17/2016 13:48:21",
"loadDevelopment" : "SantiagoBragagnolo 6/17/2016 13:48:21",
"catalogKeywords" : "SantiagoBragagnolo 6/17/2016 13:48:21",
"isMetacelloConfig" : "SantiagoBragagnolo 6/17/2016 13:48:21",
"ensureMetacelloBaseConfiguration" : "SantiagoBragagnolo 6/17/2016 13:48:21",
"loadBleedingEdge" : "SantiagoBragagnolo 6/17/2016 13:48:21",
"catalogContactInfo" : "SantiagoBragagnolo 6/17/2016 13:48:21"
"load" : "SantiagoBragagnolo 8/23/2016 17:47:47",
"catalogDescription" : "SantiagoBragagnolo 8/23/2016 17:47:47",
"baseConfigurationClassIfAbsent:" : "SantiagoBragagnolo 8/23/2016 17:47:47",
"DevelopmentSupport" : "SantiagoBragagnolo 8/23/2016 17:47:47",
"loadDevelopment" : "SantiagoBragagnolo 8/23/2016 17:47:47",
"catalogKeywords" : "SantiagoBragagnolo 8/23/2016 17:47:47",
"isMetacelloConfig" : "SantiagoBragagnolo 8/23/2016 17:47:47",
"ensureMetacelloBaseConfiguration" : "SantiagoBragagnolo 8/23/2016 17:47:47",
"loadBleedingEdge" : "SantiagoBragagnolo 8/23/2016 17:47:47",
"catalogContactInfo" : "SantiagoBragagnolo 8/23/2016 17:47:47"
}
}
3 changes: 2 additions & 1 deletion BaselineOfTaskIt.package/monticello.meta/version
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
(name 'BaselineOfTaskIt-SantiagoBragagnolo.3' message 'typo' id 'c8cbe5cb-bbf5-467a-8350-55aed301bcf1' date '23 August 2016' time '5:45:40.561354 pm' author 'SantiagoBragagnolo' ancestors ((name 'BaselineOfTaskIt-SantiagoBragangolo.2' message 'Baseline+Processes+Browser' id '847ad28b-32bd-4ce9-947e-8d346232ce39' date '23 August 2016' time '5:41:57.785927 pm' author 'SantiagoBragangolo' ancestors ((name 'BaselineOfTaskIt-GuillermoPolito.1' message 'Importing package BaselineOfTaskIt' id '5e0a94f2-8995-41f4-bdaa-e65bbadf95b2' date '23 August 2016' time '9:48:46.795129 am' author 'GuillermoPolito' ancestors () stepChildren ())) stepChildren ())) stepChildren ())
(name 'BaselineOfTaskIt-MaxLeske.6' message '* added ''tests'' group for loading tests (will load ''default'')* ''development'' now also loads ''tests''' id 'db3ee71c-e0ae-4f9e-a0b1-357abab89b68' date '30 December 2016' time '5:58:59.862521 pm' author 'MaxLeske' ancestors ((name 'BaselineOfTaskIt-MaxLeske.5' message '* added debugger package* added ''default'' group that does not include the debugger* added ''debug'' group that loads the debugger on top of ''minimal''* added ''development'' group that loads everything, including the debugger' id 'de991727-2b9d-4b5b-a631-9bde2b473a8f' date '30 December 2016' time '4:54:32.227882 pm' author 'MaxLeske' ancestors ((name 'BaselineOfTaskIt-SantiagoBragagnolo.4' message 'Added TaskItRetry' id 'ab9a68d1-7adf-4ac5-a328-d6b62f913bfa' date '19 September 2016' time '2:09:05.586072 pm' author 'GuillermoPolito' ancestors ((name 'BaselineOfTaskIt-SantiagoBragagnolo.3' message ' Baseline fixed (Typo )
' id 'fa3232a1-c4a0-5e24-9a93-4fb48b6558ea' date '23 August 2016' time '5:47:47 pm' author 'SantiagoBragagnolo' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Expand Down
4 changes: 4 additions & 0 deletions BaselineOfTaskItShell.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
as yet unclassified
baseline: spec
<baseline>
spec
for: #common
do: [ spec
baseline: #TaskIt with: [ spec repository: 'github://sbragagnolo/taskit:dev-0.3' ];
baseline: #OSSubprocess with: [ spec repository: 'github://marianopeck/OSSubprocess:master/repository' ];
package: #TaskItShell with: [ spec requires: #('TaskIt' 'OSSubprocess') ];
package: #'TaskItShell-Tests' with: [ spec requires: #('TaskItShell') ].
spec group: 'minimal' with: #(#TaskItShell) ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"class" : {
},
"instance" : {
"baseline:" : "SantiagoBragagnolo 9/26/2016 17:19" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "BaselineOfTaskItShell",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "BaselineOfTaskItShell",
"pools" : [
],
"super" : "BaselineOf",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SystemOrganization addCategory: #BaselineOfTaskItShell!
Empty file.
1 change: 1 addition & 0 deletions BaselineOfTaskItShell.package/monticello.meta/package
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'BaselineOfTaskItShell')
1 change: 1 addition & 0 deletions BaselineOfTaskItShell.package/monticello.meta/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'BaselineOfTaskItShell-SantiagoBragagnolo.2' message 'fixing the repos' id '70e2d05a-f12f-43a2-8250-5499ad56d68d' date '26 September 2016' time '5:23:12.092572 pm' author 'SantiagoBragagnolo' ancestors ((name 'BaselineOfTaskItShell-SantiagoBragagnolo.1' message 'BaselineGaskit shell' id 'd466e537-2194-491f-9ef5-0d5a0fc0690b' date '20 September 2016' time '5:46:39.924075 pm' author 'SantiagoBragagnolo' ancestors () stepChildren ())) stepChildren ())
2 changes: 2 additions & 0 deletions BaselineOfTaskItShell.package/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# TaskIt

>Anything that can go wrong, will go wrong. -- Murphy's Law
Expand Down Expand Up @@ -650,6 +651,35 @@ Finally, to allow the user to use just one interface. There is a second tab that
[image-system]: https://github.com/sbragagnolo/taskit/raw/dev-0.2/images/SystemScreen.png "System process tab"


## Debugger

TaskIt comes with a debugger extension for Pharo that can be installed by loading the 'debug' group of the baseline (the debugger is not loaded by any other group):

```smalltalk
Metacello new
baseline: 'TaskIt';
repository: 'github://sbragagnolo/taskit';
load: 'debug'.
```

After installation the TaskIt debugger extension will automatically be available to processes that are associated with a task or future. You can manually enable or disable the debugger extension by evaluating `TKTDebugger enable.` or `TKTDebugger disable.`.

The TaskIt debugger shows an augmented stack, in which the process that represents the task or future is at the top and the process that created the task or future is at the bottom (recursively for tasks and futures created from other tasks and futures). The following visualisation shows one future process (top) with frames `1` and `2` and the corresponding creator process (frames `3` and `4`):

```
-------------------
| frame 1 |
-------------------
| frame 2 |
-------------------
-------------------
| frame 3 |
-------------------
| frame 4 |
-------------------
```

The implementation and conception of this debugger extension can be found in Max Leske's Master's thesis entitled ["Improving live debugging of concurrent threads"](http://scg.unibe.ch/scgbib?query=Lesk16a&display=abstract).

## Future versions

Expand Down
5 changes: 3 additions & 2 deletions TaskIt-Tests.package/.filetree
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
10 changes: 0 additions & 10 deletions TaskIt-Tests.package/TKTBasicTaskTests.class/methodProperties.json

This file was deleted.

19 changes: 8 additions & 11 deletions TaskIt-Tests.package/TKTBasicTaskTests.class/properties.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"category" : "TaskIt-Tests",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "TKTBasicTaskTests",
"pools" : [
],
"super" : "TestCase",
"type" : "normal" }
"category" : "TaskIt-Tests",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "TKTBasicTaskTests",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
tests-combinators
testFutureAndThenFailsIfFirstFails

| future collection thenFuture got error |
future := TKTFuture new.
collection := OrderedCollection new.

thenFuture := future
andThen: [ :v | collection add: v + 1 ];
andThen: [ :v | collection add: v + 2 ];
andThen: [ :v | collection add: v + 3 ].

thenFuture onFailureDo: [ :e | got := e ].

error := Error new.
future deployFailure: error.
[ error signal ]
on: Error
do: [ :e | future deployFailure: e ].
50 milliSecond wait.

self assert: got equals: error
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
tests-combinators
testFutureCollectFailsOnFailure

| future got error |
future := TKTFuture new.

future := TKTFuture new.
(future collect: [ :v | v * 5 ]) onFailureDo: [ :v | got := v ].

error := Error new.
future deployFailure: error.
[ error signal ]
on: Error
do: [ :e | future deployFailure: e ].
50 milliSecond wait.

self assert: got equals: error
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
tests-combinators
testFutureFallbackToFailsIfBothFail

| future got fallbackFuture error |
future := TKTFuture new.
fallbackFuture := TKTFuture new.

fallbackFuture := TKTFuture new.
(future fallbackTo: fallbackFuture) onFailureDo: [ :v | got := v ].

error := Error new.
fallbackFuture deployFailure: error.
future deployFailure: Error new.
[ error signal ]
on: Error
do: [ :e | fallbackFuture deployFailure: e ].
future deployFailure: Error new.
50 milliSecond wait.

self assert: got equals: error
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ testFutureFirstCompleteOfFailsIfFirstFailsFaster
(future firstCompleteOf: secondFuture) onFailureDo: [ :v | got := v ].

error := Error new.
future deployFailure: error.
[ error signal ]
on: Error
do: [ :e | future deployFailure: e ].
secondFuture deploySuccess: 1.
50 milliSecond wait.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ testFutureFirstCompleteOfFailsIfSecondFailsFaster
(future firstCompleteOf: secondFuture) onFailureDo: [ :v | got := v ].

error := Error new.
secondFuture deployFailure: error.
[ error signal ]
on: Error
do: [ :e | secondFuture deployFailure: e ].
future deploySuccess: 1.
50 milliSecond wait.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
tests-combinators
testFutureFirstCompleteOfSuccessIfFirstSuccessFaster

| future got secondFuture |
| future got secondFuture error |
future := TKTFuture new.
secondFuture := TKTFuture new.

(future firstCompleteOf: secondFuture) onSuccessDo: [ :v | got := v ].

future deploySuccess: 5.
secondFuture deployFailure: Error new.
error := Error new.
[ error signal ]
on: Error
do: [ :e | secondFuture deployFailure: e ].
50 milliSecond wait.

self assert: got equals: 5
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
tests-combinators
testFutureFlatCollectFailsOnMappedFutureFailure

| future got error innerFuture |
future := TKTFuture new.
future := TKTFuture new.
innerFuture := TKTFuture new.
(future flatCollect: [ :v | innerFuture ]) onFailureDo: [ :v | got := v ].

error := Error new.
future deploySuccess: 2.
innerFuture deployFailure: error.
error := Error new.
[ error signal ]
on: Error
do: [ :e | innerFuture deployFailure: e ].
50 milliSecond wait.

self assert: got equals: error
Loading

0 comments on commit cf80bfe

Please sign in to comment.