Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/massive/munit/TestRunner.hx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ class TestRunner implements IAsyncDelegateObserver

#if (neko || cpp || java || hl || eval)
var self = this;
var runThread:Thread = Thread.create(function()
var createThread = Thread.create;
#if (haxe4 && (haxe >= version("4.2.0-rc.1")))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not #if (haxe >= version("4.2.0-rc.1"))?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mb?

var createThread = #if (haxe >= version("4.2.0-rc.1")) Thread.createWithEventLoop #else Thread.create #end;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to break compatibility with Haxe 3, version("x.x.x") is a Haxe 4 feature

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that being said... I should have tested with Haxe 3, which makes a bit more ugly. I had to split the conditionals to make it work.

createThread = Thread.createWithEventLoop;
#end
var runThread:Thread = createThread(function()
{
self.execute();
while (self.running)
Expand Down