16 Commits

Author SHA1 Message Date
145c3ae34a Add completeExceptionally, cancelAndJoin, and refine LaunchPool spec
- CompletableDeferred.completeExceptionally(exception): fails the deferred
  with a Lyng exception; the original exception object is preserved as
  errorObject so assertThrows/catch see the correct class (works for both
  built-in ObjException and user-declared class instances)
- LaunchPool: add maxQueueSize parameter (suspends launch when full),
  add cancelAndJoin() for graceful shutdown that waits for running tasks,
  clarify all semantics in the extern declaration comments
- Two tests for completeExceptionally (built-in and user-defined exception)
- Fix parallelism.md channel doc-test to be illustration-only (avoid
  flakiness from coroutine scheduling in the doc-test runner)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 03:00:40 +03:00
f9a07f176a Add Channel primitive for coroutine inter-task communication
Exposes Kotlin's Channel<Obj> to Lyng scripts as a first-class type
with rendezvous, buffered, and unlimited capacity modes. Supports
suspending send/receive, non-suspending tryReceive, close/drain
semantics, and isClosedForSend/isClosedForReceive properties.

Also fixes a pre-existing typo in BookTest.kt that blocked JVM test
compilation, and adds Channel reference docs and a parallelism.md section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 02:28:55 +03:00
311cf6ee44 Add Lyng deferred cancellation support 2026-03-31 22:50:46 +03:00
45f3658742 better docs/AI instructions/readme 2026-02-19 01:06:08 +03:00
28d3f8364c fixed booktests 2026-02-18 10:14:09 +03:00
7ab439d949 Updated documentation to clarify property syntax, closure resolution rules, and override usage 2026-01-10 18:08:07 +01:00
b953282251 docs on updated scopes 2025-12-10 00:04:07 +01:00
e584c7aa63 site/docs improvements 2025-11-28 11:25:47 +01:00
38c1b3c209 big optimization round 2025-11-10 22:14:21 +01:00
0b9e94c6e9 v0.10.1-SNAPSHOT optimization: Accessor refactored now use more effective ObjRef and slots for locals 2025-11-09 23:19:02 +01:00
4b613fda7c fix #58 improper toString overload processing in Lyng
fix #57 Exception#getStackTrace()
ref #56 StackTraceEntry is serializable now
2025-08-22 00:02:23 +03:00
3948283481 0.8.4: stadlib in Lyng! added universal Iterable functions 2025-08-09 22:50:48 +03:00
9aae33d564 fix #48 flows 2025-08-08 19:33:17 +03:00
1a90b25b1e fix #51 ref #48 flows started. bad closure-based bug fixed 2025-08-08 19:23:43 +03:00
0f54e2f845 ref #47 yield 2025-08-07 21:46:45 +03:00
19f8b6605b fix #47 parallelism: launch, Deferred, CompletableDeferred, Mutex (delay was already implemented) 2025-08-07 20:31:36 +03:00