Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: krdlab/setup-haxe@v2
with:
haxe-version: "2025-09-17_kt_coro_803640c"
haxe-version: "2025-10-21_kt_coro_9281286"

- uses: cedx/setup-hashlink@v6
if: matrix.target == 'hl' && matrix.os == 'windows-latest'
Expand Down
5 changes: 2 additions & 3 deletions src/hxcoro/Coro.hx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import haxe.coro.IContinuation;
import haxe.coro.ICancellableContinuation;
import haxe.coro.schedulers.Scheduler;
import haxe.coro.cancellation.CancellationToken;
import haxe.exceptions.CancellationException;
import haxe.exceptions.ArgumentException;
import hxcoro.task.NodeLambda;
import hxcoro.task.CoroTask;
Expand All @@ -14,7 +13,7 @@ import hxcoro.continuations.TimeoutContinuation;

class Coro {
@:coroutine @:coroutine.transformed
public static function suspend<T>(func:IContinuation<T>->Void, completion:IContinuation<T>):T {
public static function suspend<T>(completion:IContinuation<T>, func:IContinuation<T>->Void):T {
var safe = new hxcoro.continuations.RacingContinuation(completion);
func(safe);
safe.resolve();
Expand All @@ -26,7 +25,7 @@ class Coro {
* The `ICancellableContinuation` passed to the function allows registering a callback which is invoked on cancellation
* allowing the easy cleanup of resources.
*/
@:coroutine @:coroutine.transformed public static function suspendCancellable<T>(func:ICancellableContinuation<T>->Void, completion:IContinuation<T>):T {
@:coroutine @:coroutine.transformed public static function suspendCancellable<T>(completion:IContinuation<T>, func:ICancellableContinuation<T>->Void):T {
var safe = new CancellingContinuation(completion);
func(safe);
return cast safe;
Expand Down
2 changes: 1 addition & 1 deletion tests/src/TestGenerator.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private function sequence<T>(f:Coroutine<Yield<T>->Void>):Iterator<T> {
}

nextStep = () -> {
f(yield, scope);
f(scope, yield);
scope.start();
}

Expand Down
Loading