Skip to content

Commit c5fc79f

Browse files
committed
Stub permit handling on the JVM.
1 parent 316d2ef commit c5fc79f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/vm/jvm/QAST/Compiler.nqp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2814,6 +2814,7 @@ QAST::OperationsJAST.map_classlib_core_op('queuepoll', $TYPE_OPS, 'queuepoll', [
28142814

28152815
# asynchrony related ops
28162816
QAST::OperationsJAST.map_classlib_core_op('timer', $TYPE_OPS, 'timer', [$RT_OBJ, $RT_OBJ, $RT_INT, $RT_INT, $RT_OBJ], $RT_OBJ, :tc);
2817+
QAST::OperationsJAST.map_classlib_core_op('permit', $TYPE_OPS, 'permit', [$RT_OBJ, $RT_INT, $RT_INT], $RT_OBJ, :tc);
28172818
QAST::OperationsJAST.map_classlib_core_op('cancel', $TYPE_OPS, 'cancel', [$RT_OBJ], $RT_OBJ, :tc);
28182819
QAST::OperationsJAST.map_classlib_core_op('cancelnotify', $TYPE_OPS, 'cancelnotify', [$RT_OBJ, $RT_OBJ, $RT_OBJ], $RT_OBJ, :tc);
28192820
QAST::OperationsJAST.map_classlib_core_op('signal', $TYPE_IO_OPS, 'signal', [$RT_OBJ, $RT_OBJ, $RT_INT, $RT_OBJ], $RT_OBJ, :tc);

src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5592,6 +5592,12 @@ public static SixModelObject timer(SixModelObject queue, SixModelObject schedule
55925592
handle.handle = tt;
55935593
return handle;
55945594
}
5595+
public static SixModelObject permit(SixModelObject handle, long channel, long permits,
5596+
ThreadContext tc) {
5597+
AsyncTaskInstance task = (AsyncTaskInstance) handle;
5598+
// TODO Implement permit handling properly
5599+
return handle;
5600+
}
55955601
public static SixModelObject cancel(SixModelObject handle, ThreadContext tc) {
55965602
AsyncTaskInstance task = (AsyncTaskInstance) handle;
55975603
if (task.handle instanceof IIOCancelable) {

0 commit comments

Comments
 (0)