From 87b8dffe2336b62d5e0d67e416a4b5c4d1871f3b Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 15 Aug 2021 17:36:47 -0500 Subject: [PATCH] Deprecate the thread module. --- CHANGELOG.md | 4 ++++ src/boot/boot.janet | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c91616..88384461 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. ## 1.17.0 - Unreleased +- Deprecate the `thread` library. Use threaded channels and ev instead. +- Channels can now be marshalled. +- Add the ability to close channels with `ev/chan-close` (or `:close`). +- Add threaded channels with `ev/thread-chan`. - Add `JANET_FN` and `JANET_REG` macros to more easily define C functions that export their source mapping information. - Add `janet_interpreter_interupt` and `janet_loop1_interrupt` to interrupt the interpreter while running. - Add `table/clear` diff --git a/src/boot/boot.janet b/src/boot/boot.janet index b86ee961..bb48aaa8 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -3651,6 +3651,12 @@ (put into k (x k)))) into) + # Deprecate thread library + (loop [[k v] :in (pairs root-env) + :when (symbol? k) + :when (string/has-prefix? "thread/" k)] + (put v :deprecated true)) + # Modify root-env to remove private symbols and # flatten nested tables. (loop [[k v] :in (pairs root-env)