moved to coroutines package

This commit is contained in:
Parker TenBroeck 2026-05-13 08:56:07 -04:00
parent 1c0430cfac
commit 3c59263a55
37 changed files with 85 additions and 88 deletions

View file

@ -1,7 +1,4 @@
package basic; package basic;
import com.parkertenbroeck.future.Future;
import com.parkertenbroeck.future.Waker;
public class Futures { public class Futures {
} }

View file

@ -1,6 +1,6 @@
package basic; package basic;
import com.parkertenbroeck.generator.Gen; import com.parkertenbroeck.coroutines.generator.Gen;
public class Gens { public class Gens {
public static Gen<Long, Void> primes(){ public static Gen<Long, Void> primes(){

View file

@ -1,8 +1,8 @@
package basic; package basic;
import com.parkertenbroeck.bcsm.RT; import com.parkertenbroeck.coroutines.bcsm.RT;
import com.parkertenbroeck.bcsm.loadtime.CoroutineClassLoader; import com.parkertenbroeck.coroutines.bcsm.loadtime.CoroutineClassLoader;
import com.parkertenbroeck.generator.Gen; import com.parkertenbroeck.coroutines.generator.Gen;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {

View file

@ -1,6 +1,6 @@
package lexer; package lexer;
import com.parkertenbroeck.generator.Gen; import com.parkertenbroeck.coroutines.generator.Gen;
public class Lexer { public class Lexer {
public sealed interface Token{} public sealed interface Token{}

View file

@ -1,8 +1,8 @@
package lexer; package lexer;
import com.parkertenbroeck.generator.Gen; import com.parkertenbroeck.coroutines.generator.Gen;
import com.parkertenbroeck.bcsm.RT; import com.parkertenbroeck.coroutines.bcsm.RT;
import com.parkertenbroeck.bcsm.loadtime.CoroutineClassLoader; import com.parkertenbroeck.coroutines.bcsm.loadtime.CoroutineClassLoader;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {

View file

@ -1,8 +1,8 @@
package sockets; package sockets;
import com.parkertenbroeck.async_runtime.Jokio; import com.parkertenbroeck.coroutines.async_runtime.Jokio;
import com.parkertenbroeck.bcsm.RT; import com.parkertenbroeck.coroutines.bcsm.RT;
import com.parkertenbroeck.bcsm.loadtime.CoroutineClassLoader; import com.parkertenbroeck.coroutines.bcsm.loadtime.CoroutineClassLoader;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {

View file

@ -1,12 +1,11 @@
package sockets; package sockets;
import com.parkertenbroeck.async_runtime.Delay; import com.parkertenbroeck.coroutines.async_runtime.Delay;
import com.parkertenbroeck.async_runtime.Jokio; import com.parkertenbroeck.coroutines.async_runtime.Jokio;
import com.parkertenbroeck.async_runtime.io.net.ServerSocket; import com.parkertenbroeck.coroutines.async_runtime.io.net.ServerSocket;
import com.parkertenbroeck.async_runtime.io.net.Socket; import com.parkertenbroeck.coroutines.async_runtime.io.net.Socket;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import com.parkertenbroeck.bcsm.loadtime.future.Cancellation; import com.parkertenbroeck.coroutines.bcsm.loadtime.future.Cancellation;
import com.parkertenbroeck.future.Waker;
import java.io.IOException; import java.io.IOException;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;

View file

@ -1,5 +1,5 @@
version = "0.1.0" version = "0.1.0"
group = "com.parkertenbroeck.generators" group = "com.parkertenbroeck.coroutines"
plugins { plugins {
`java-library` `java-library`

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.async_runtime; package com.parkertenbroeck.coroutines.async_runtime;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;

View file

@ -1,7 +1,7 @@
package com.parkertenbroeck.async_runtime; package com.parkertenbroeck.coroutines.async_runtime;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import com.parkertenbroeck.future.Waker; import com.parkertenbroeck.coroutines.future.Waker;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;

View file

@ -1,7 +1,7 @@
package com.parkertenbroeck.async_runtime; package com.parkertenbroeck.coroutines.async_runtime;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import com.parkertenbroeck.future.Waker; import com.parkertenbroeck.coroutines.future.Waker;
import java.util.ArrayDeque; import java.util.ArrayDeque;
import java.util.HashSet; import java.util.HashSet;

View file

@ -1,9 +1,8 @@
package com.parkertenbroeck.async_runtime; package com.parkertenbroeck.coroutines.async_runtime;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import java.util.*; import java.util.*;
import java.util.function.Function;
public class Util { public class Util {

View file

@ -1,6 +1,6 @@
package com.parkertenbroeck.async_runtime.io; package com.parkertenbroeck.coroutines.async_runtime.io;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.async_runtime.io; package com.parkertenbroeck.coroutines.async_runtime.io;
import java.io.IOException; import java.io.IOException;
import java.nio.channels.*; import java.nio.channels.*;

View file

@ -1,6 +1,6 @@
package com.parkertenbroeck.async_runtime.io; package com.parkertenbroeck.coroutines.async_runtime.io;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;

View file

@ -1,9 +1,9 @@
package com.parkertenbroeck.async_runtime.io.fs; package com.parkertenbroeck.coroutines.async_runtime.io.fs;
import com.parkertenbroeck.async_runtime.io.Readable; import com.parkertenbroeck.coroutines.async_runtime.io.Readable;
import com.parkertenbroeck.async_runtime.io.Writable; import com.parkertenbroeck.coroutines.async_runtime.io.Writable;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import com.parkertenbroeck.future.Waker; import com.parkertenbroeck.coroutines.future.Waker;
import java.io.IOException; import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;

View file

@ -1,10 +1,10 @@
package com.parkertenbroeck.async_runtime.io.net; package com.parkertenbroeck.coroutines.async_runtime.io.net;
import com.parkertenbroeck.async_runtime.io.Readable; import com.parkertenbroeck.coroutines.async_runtime.io.Readable;
import com.parkertenbroeck.async_runtime.io.SelectorThread; import com.parkertenbroeck.coroutines.async_runtime.io.SelectorThread;
import com.parkertenbroeck.async_runtime.io.Writable; import com.parkertenbroeck.coroutines.async_runtime.io.Writable;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import com.parkertenbroeck.future.Waker; import com.parkertenbroeck.coroutines.future.Waker;
import java.io.IOException; import java.io.IOException;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;

View file

@ -1,8 +1,8 @@
package com.parkertenbroeck.async_runtime.io.net; package com.parkertenbroeck.coroutines.async_runtime.io.net;
import com.parkertenbroeck.async_runtime.io.SelectorThread; import com.parkertenbroeck.coroutines.async_runtime.io.SelectorThread;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import com.parkertenbroeck.future.Waker; import com.parkertenbroeck.coroutines.future.Waker;
import java.io.IOException; import java.io.IOException;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;

View file

@ -1,10 +1,10 @@
package com.parkertenbroeck.async_runtime.io.net; package com.parkertenbroeck.coroutines.async_runtime.io.net;
import com.parkertenbroeck.async_runtime.io.Readable; import com.parkertenbroeck.coroutines.async_runtime.io.Readable;
import com.parkertenbroeck.async_runtime.io.SelectorThread; import com.parkertenbroeck.coroutines.async_runtime.io.SelectorThread;
import com.parkertenbroeck.async_runtime.io.Writable; import com.parkertenbroeck.coroutines.async_runtime.io.Writable;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import com.parkertenbroeck.future.Waker; import com.parkertenbroeck.coroutines.future.Waker;
import java.io.IOException; import java.io.IOException;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;

View file

@ -1,7 +1,7 @@
package com.parkertenbroeck.bcsm; package com.parkertenbroeck.coroutines.bcsm;
import com.parkertenbroeck.bcsm.loadtime.CoroutineClassLoader; import com.parkertenbroeck.coroutines.bcsm.loadtime.CoroutineClassLoader;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.util.Set; import java.util.Set;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
import java.lang.classfile.*; import java.lang.classfile.*;
import java.lang.classfile.attribute.InnerClassInfo; import java.lang.classfile.attribute.InnerClassInfo;

View file

@ -1,9 +1,9 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.future.Future;
import com.parkertenbroeck.generator.Gen; import com.parkertenbroeck.coroutines.generator.Gen;
import com.parkertenbroeck.bcsm.loadtime.future.FutureSMBuilder; import com.parkertenbroeck.coroutines.bcsm.loadtime.future.FutureSMBuilder;
import com.parkertenbroeck.bcsm.loadtime.gen.GenSMBuilder; import com.parkertenbroeck.coroutines.bcsm.loadtime.gen.GenSMBuilder;
import java.io.IOException; import java.io.IOException;
import java.lang.classfile.*; import java.lang.classfile.*;
@ -33,7 +33,7 @@ public class CoroutineClassLoader extends ClassLoader {
} }
public static Config builtin(){ public static Config builtin(){
return empty() return empty()
.skip("java", "jdk", "jre", "com.parkertenbroeck.bcsm.loadtime") .skip("java", "jdk", "jre", "com.parkertenbroeck.coroutines.bcsm.loadtime")
.with(Future.class, FutureSMBuilder::new) .with(Future.class, FutureSMBuilder::new)
.with(Gen.class, GenSMBuilder::new); .with(Gen.class, GenSMBuilder::new);
} }

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
import java.lang.classfile.CodeBuilder; import java.lang.classfile.CodeBuilder;
import java.lang.classfile.instruction.LineNumber; import java.lang.classfile.instruction.LineNumber;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
import java.lang.classfile.*; import java.lang.classfile.*;
import java.lang.classfile.attribute.RuntimeInvisibleTypeAnnotationsAttribute; import java.lang.classfile.attribute.RuntimeInvisibleTypeAnnotationsAttribute;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
import java.lang.constant.ClassDesc; import java.lang.constant.ClassDesc;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
public enum ReplacementKind { public enum ReplacementKind {
ImmediateReplacingPop, ImmediateReplacingPop,

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
import java.lang.classfile.CodeBuilder; import java.lang.classfile.CodeBuilder;
import java.lang.classfile.TypeKind; import java.lang.classfile.TypeKind;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
import java.lang.constant.ClassDesc; import java.lang.constant.ClassDesc;
import java.lang.constant.MethodTypeDesc; import java.lang.constant.MethodTypeDesc;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
import java.lang.classfile.CodeBuilder; import java.lang.classfile.CodeBuilder;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
import java.lang.classfile.CodeBuilder; import java.lang.classfile.CodeBuilder;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime; package com.parkertenbroeck.coroutines.bcsm.loadtime;
import java.lang.classfile.CodeBuilder; import java.lang.classfile.CodeBuilder;
import java.lang.classfile.Label; import java.lang.classfile.Label;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.bcsm.loadtime.future; package com.parkertenbroeck.coroutines.bcsm.loadtime.future;
import java.lang.annotation.*; import java.lang.annotation.*;

View file

@ -1,8 +1,9 @@
package com.parkertenbroeck.bcsm.loadtime.future; package com.parkertenbroeck.coroutines.bcsm.loadtime.future;
import com.parkertenbroeck.future.Future; import com.parkertenbroeck.coroutines.bcsm.loadtime.*;
import com.parkertenbroeck.future.Waker; import com.parkertenbroeck.coroutines.future.Future;
import com.parkertenbroeck.bcsm.loadtime.*; import com.parkertenbroeck.coroutines.future.Waker;
import com.parkertenbroeck.coroutines.bcsm.loadtime.*;
import java.lang.classfile.*; import java.lang.classfile.*;
import java.lang.classfile.instruction.SwitchCase; import java.lang.classfile.instruction.SwitchCase;

View file

@ -1,7 +1,8 @@
package com.parkertenbroeck.bcsm.loadtime.gen; package com.parkertenbroeck.coroutines.bcsm.loadtime.gen;
import com.parkertenbroeck.generator.Gen; import com.parkertenbroeck.coroutines.bcsm.loadtime.*;
import com.parkertenbroeck.bcsm.loadtime.*; import com.parkertenbroeck.coroutines.generator.Gen;
import com.parkertenbroeck.coroutines.bcsm.loadtime.*;
import java.lang.classfile.*; import java.lang.classfile.*;
import java.lang.constant.ClassDesc; import java.lang.constant.ClassDesc;

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.future; package com.parkertenbroeck.coroutines.future;
public interface Future<R, E extends Throwable> { public interface Future<R, E extends Throwable> {

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.future; package com.parkertenbroeck.coroutines.future;
public interface Waker { public interface Waker {

View file

@ -1,4 +1,4 @@
package com.parkertenbroeck.generator; package com.parkertenbroeck.coroutines.generator;
public interface Gen<Y, R> { public interface Gen<Y, R> {
Res<Y, R> next(); Res<Y, R> next();