forked from rsdn/nemerle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea99170
commit ee54589
Showing
4 changed files
with
66 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
snippets/Nemerle.Test/Nemerle.Compiler.Test/ThreadRunner.n
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Nemerle; | ||
using Nemerle.Assertions; | ||
using Nemerle.Collections; | ||
using Nemerle.Text; | ||
using Nemerle.Utility; | ||
|
||
using Nemerle.Test.Framework; | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading; | ||
|
||
namespace Nemerle.Compiler.Test | ||
{ | ||
/// <summary> | ||
/// Description of ThreadRunner. | ||
/// </summary> | ||
internal sealed class ThreadRunner : Runner | ||
{ | ||
public this([NotNull] executionListener : ExecutionListener, stackSize : int) | ||
{ | ||
base(executionListener); | ||
_stackSize = stackSize; | ||
} | ||
|
||
public override Run([NotNull] tests : IEnumerable[Test]) : void | ||
{ | ||
def thread = Thread(fun() { base.Run(tests) }, _stackSize); | ||
thread.Start(); | ||
thread.Join(); | ||
} | ||
|
||
private _stackSize : int; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters