1
0
mirror of https://github.com/janet-lang/janet synced 2026-05-31 09:42:15 +00:00
Commit Graph

3058 Commits

Author SHA1 Message Date
llmII 2a4bcc262f Don't bind when address info doesn't exist
Simple logic issue, something overlooked.
2021-09-06 09:06:40 -05:00
llmII 1ce2361daf Better error message in connect
Quick thing to help check when failing tests.
2021-09-06 09:02:56 -05:00
llmII 6e8584e8e0 Add bind option to net/connect
This will allow us to set the address we use for outgoing connections.

Builds, haven't checked it passes current tests, haven't checked it
actually works either.
2021-09-06 08:54:24 -05:00
Calvin Rose 7037532943 Errored threads always emit stacktrace or supervisor event.
That way, it is much harder to swallow errors. Error swallowing behavior
would have to be done explicitly by wrapping fibers with `protect` or
`try`.
2021-09-01 21:05:05 -05:00
Calvin Rose bb405ee1aa Address #778
Relax check that number of closure environments in a function matches
that of the def.

The def could be partially constructed, and so there may be a false
negative. The runtime will check that this is consistent, and the
garbage collector should handle when this constraint is not kept.
2021-08-31 22:58:44 -05:00
Calvin Rose ef23356309 Threaded supervisors return fiber->last_value instead
of the fiber itself.
2021-08-31 14:50:27 -05:00
Calvin Rose 1613e2593c Update CHANGELOG.md 2021-08-30 22:24:34 -05:00
Calvin Rose 5464a7a379 Allow passing a function to directly to ev/go.
Makes ev/call less useful but ev/go more useful. No need
to construct as many identical intermediate fibers.
2021-08-30 22:22:22 -05:00
Calvin Rose bb1331e449 Update changelog. 2021-08-30 22:06:28 -05:00
Calvin Rose acbebc5631 Allow passing function to ev/thread.
Convenient when there is no need to create an entire fiber.
2021-08-30 22:04:15 -05:00
Calvin Rose e1c4fc29de Prepare for 1.17.1 release. v1.17.1 2021-08-29 11:29:41 -05:00
Calvin Rose b903433284 Merge branch 'master' of github.com:janet-lang/janet 2021-08-29 11:15:43 -05:00
Calvin Rose 31a7fdc7b6 Add Make task to more easily install jpm. 2021-08-29 11:15:15 -05:00
Calvin Rose 9909adb665 Remove JANER_HEADERPATH from boot process.
That is a jpm thing.
2021-08-29 10:43:58 -05:00
Calvin Rose 26f8ba48ee Merge pull request #775 from pepe/ev-docs
Fix typos in ev/go ev/select
2021-08-28 16:20:25 -05:00
Josef Pospíšil 29ea408980 Fix spawn-thread doc about its return 2021-08-28 15:39:49 +02:00
Josef Pospíšil 0bb7ca7441 Fix typos in ev/go ev/select 2021-08-28 15:35:55 +02:00
Calvin Rose a992644c62 Merge branch 'master' of github.com:janet-lang/janet 2021-08-27 11:52:19 -05:00
Calvin Rose 1c15926e6f Fix #773 - fix docstring. 2021-08-27 11:52:03 -05:00
Calvin Rose c921315b3e Merge pull request #774 from sogaiu/tweak-fiber-last-value-docstring
Tweak fiber/last-value docstring
2021-08-27 11:51:13 -05:00
Calvin Rose ab740f92db Fix ev thread swallowing error in some case. 2021-08-27 11:46:42 -05:00
sogaiu 1d7390fa7c Tweak fiber/last-value docstring 2021-08-27 17:29:20 +09:00
Calvin Rose 0ab96b8e47 Fix #771 2021-08-26 22:23:21 -05:00
Calvin Rose 6f6edd37ef Merge pull request #772 from pyrmont/feature.gh-test
Add GitHub Workflow to test
2021-08-26 22:20:48 -05:00
Michael Camilleri f4282de068 Add GitHub Workflow to test 2021-08-25 10:49:56 +09:00
Calvin Rose 85c85c07b7 Merge pull request #770 from pyrmont/feature.gh-release
Use GitHub Workflow to create release (including building for Linux and macOS)
2021-08-24 08:36:57 -05:00
Michael Camilleri 7abcb1579a Set JANET_DIST_DIR before making artifact 2021-08-23 15:47:25 +09:00
Michael Camilleri 7ce733cc16 Change lowercase step 2021-08-23 15:24:25 +09:00
Michael Camilleri 41a3c5f846 Add GitHub Workflow to draft release 2021-08-23 14:55:59 +09:00
bakpakin 7734e77dfc Readd the janet_register function. 2021-08-22 10:38:15 -05:00
Calvin Rose 257c8b65c2 Fix destruction order. v1.17.0 2021-08-21 13:30:09 -05:00
Calvin Rose 846c9e5e12 Fix #759 - Add -E flag for one-liners.
Use the `short-fn` DSL here for argument passing.
2021-08-21 13:16:41 -05:00
Calvin Rose 685d2b460c Address #765. Make assert into a macro. 2021-08-21 12:27:58 -05:00
Calvin Rose bd71e1cd02 Silence clang warning about comparing function pointers.
The comparison is used to create a set of function pointers.
2021-08-21 12:10:19 -05:00
Calvin Rose 43a5e12449 Merge branch 'master' of github.com:janet-lang/janet 2021-08-21 12:07:39 -05:00
Calvin Rose ca97510a52 Prepare for 1.17.0 release. 2021-08-21 12:07:28 -05:00
Calvin Rose 50b753cb44 Merge pull request #768 from sogaiu/remove-threads-example
Remove threads example
2021-08-21 11:15:54 -05:00
sogaiu 5ca6704c4d Remove threads example 2021-08-21 14:52:51 +09:00
Calvin Rose 49142fa385 Update for windows compiler warning. 2021-08-20 19:48:48 -05:00
Calvin Rose d631d29cb4 Fix typo in header. 2021-08-20 18:53:22 -05:00
Calvin Rose 01b7891347 Windows header issues. 2021-08-20 18:49:13 -05:00
Calvin Rose c786a4cbeb Expose JanetOSMutex to make abstract types easier to write. 2021-08-20 17:57:23 -05:00
Calvin Rose 1920ecd668 Decrement thread channel pointer during cleanup without adding to heap. 2021-08-20 16:41:19 -05:00
Calvin Rose c8827424e7 Fix memory leak and use after free
Use after free was caused by missing janet_gcroot call when
setting up thread.
2021-08-19 21:51:53 -05:00
Calvin Rose cc066dd6a1 Add basic runtime support for threaded abstracts.
A threaded abstract is an abstract type that can be freely shared
between threads. While no synchronization is provided, refcounting
and transport between threads is. This will let implementers more easily
exploit OS-level parallelism in C library code. The caveat with these
types is that they need to be careful in how they interact with objects
on other heaps.
2021-08-19 21:16:20 -05:00
Calvin Rose eb0b37f729 Initial threaded abstract types. 2021-08-19 20:56:48 -05:00
Calvin Rose e552757edc Fix threaded supervisor channels - Fix #766
Some pointer casting with abstract types was incorrect, resulting
in strange behavior when trying to use supervisor channels that were
threaded. This fix also adds the ability to supply a supervisor channel
directly when creating a thread.
2021-08-16 21:14:06 -05:00
Calvin Rose 87b8dffe23 Deprecate the thread module. 2021-08-15 17:36:47 -05:00
Calvin Rose 81b5904188 Add marshal/unmarshal to items pushed to threaded channel. 2021-08-15 16:12:40 -05:00
Calvin Rose 894a3b2fe2 Fix memory leak with threaded channels. 2021-08-15 15:33:26 -05:00