Skip to content

Commit

Permalink
Add comments about the implementation being wrong at the moment
Browse files Browse the repository at this point in the history
  • Loading branch information
b-studios committed Jan 22, 2024
1 parent b087e2b commit 03e1c26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/pos/bidirectional/scheduler.effekt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ def scheduler { prog: => Unit / Process } = region this {
def yield() = {
queue = queue.pushFront(fun() { resume(()) })
}
def fork() = {
def fork() /* {{() => Unit} => Unit} => Unit */ = {
queue = queue
.pushFront(fun() { resume { {prog: () => Unit} => prog() } })
.pushFront(fun() { resume { {prog: () => Unit} => prog() /* FIX do abort() */ } })
.pushFront(fun() { resume { {prog: () => Unit} => () } })
}
def exit() = ()
def exit() /* Nothing => Unit */ = ()
}

run()
Expand All @@ -42,7 +42,7 @@ def main() = {
println(1)
do yield()
println(2)
do exit()
do exit() // FIX this is crucial since fork is not implemented correctly
println(3)
}
println("hello 2")
Expand Down

0 comments on commit 03e1c26

Please sign in to comment.