Calvin Rose
549ee95f3d
Add os/posix-exec (along os/posix-fork)
...
Useful for old-style unix daemons, start up scripts, and so on.
Easy to add on top of os/execute.
May want to consider allowing the same IO redirection as os/execute
and os/spawn.
May also want to put both fork and exec behind a config switch since I
suppose some systems may not support them, although I don't know of any
concrete examples.
2023-10-08 21:03:08 -05:00
Calvin Rose
84ad161f1e
Add support for weak references in arrays.
...
Also change weak table syntax to not require keyword arguments.
2023-09-30 10:56:43 -05:00
Calvin Rose
b3a6e25ce0
Add weak references in the form of weak tables.
...
Any references exclusively held by a weak table may be collected
without the programmer needing to free references manually. A table
can be setup to have weak keys, weak values, or both.
2023-09-27 23:36:09 -05:00
Calvin Rose
21eab7e9cc
Update sigaction to help address #1262 .
...
Update example to have 4 cases - case 3 was previously broken but should
now work.
2023-08-23 09:16:59 -05:00
Calvin Rose
d9605c2856
Allow iterating over generators with pairs, keys, and values.
2023-08-22 19:25:05 -05:00
Calvin Rose
f45571033c
Add os/sigaction for signal handling.
...
Also improve interrupts to work better with busy loops
and signals.
2023-08-19 13:26:29 -05:00
Calvin Rose
9a2897e741
Run through astyle with manual corrections
2023-06-08 13:01:49 -05:00
Calvin Rose
90f212df92
Add length method ffi/jitfn abstract values.
2022-12-04 11:08:17 -06:00
Calvin Rose
aa60c1f36a
Add ffi jit example.
2022-12-03 17:52:23 -06:00
bakpakin
43c47ac44c
Address #1037 - move stack hack after arg writing logic to avoid
...
clobber.
2022-09-20 15:37:20 -05:00
Calvin Rose
1cebe64664
Add some soft test cases for #1037 .
2022-09-20 10:01:12 -05:00
Calvin Rose
3479841c77
Address #1034 - add handling for 8-16 byte structs in FFI.
2022-09-20 09:28:46 -05:00
Calvin Rose
6a899968a9
Allow passing user signals to (signal) as keywords.
2022-09-17 21:18:07 -05:00
bakpakin
c7bc711f63
Add windows FFI example test case for void functions with double
...
argument.
2022-09-15 13:58:54 -05:00
Calvin Rose
1f7f20788c
Add line loop example for awk or sed like processing.
2022-08-26 12:29:23 -05:00
Calvin Rose
c59dd29190
Add stress test for marshalling to examples.
2022-08-26 12:27:53 -05:00
Calvin Rose
f5d11dc656
Address #1014 improve parse errors when bad delimiters are found.
...
Reuse some existing logic for eof errors.
2022-08-24 11:34:59 -05:00
bakpakin
c043b1d949
Add win32 ffi example.
2022-08-14 15:40:09 -05:00
bakpakin
9a6d2a7b32
Fix FFI for reference return values and stack parameter passing.
2022-08-14 15:20:30 -05:00
bakpakin
f8a9efa8e4
Allow binding pre-loaded symbols in windows FFI.
...
Mimic the posix RTLD_NOW setting for dlopen by iterating
opened DLLs to look for symbols.
2022-08-14 13:26:13 -05:00
Calvin Rose
47e91bfd89
Fix docstring.
2022-06-19 18:52:37 -05:00
Calvin Rose
a6f93efd39
Support for array types in ffi.
2022-06-19 08:03:32 -05:00
Calvin Rose
a1aab4008f
Update FFI example.
2022-06-18 10:06:39 -05:00
Calvin Rose
40e9430278
Move examples to example directory.
2022-06-17 17:24:52 -05:00
Calvin Rose
c9f33bbde0
Add rwlocks.
2022-06-05 16:42:18 -05:00
Calvin Rose
e1602618c3
Merge pull request #894 from pepe/fix-numarray-example
...
Improve numarray example
2021-12-09 14:09:11 -06:00
Josef Pospíšil
04e499c97f
Add search on PATH for async execute example
2021-12-09 11:57:21 +01:00
Josef Pospíšil
f586a8a9dc
Add length to method and lib fn to numarray
2021-12-09 11:18:05 +01:00
Josef Pospíšil
5112ed77d6
Fix test import, and add sum as library fn too
2021-12-09 11:12:08 +01:00
Michael Camilleri
e1460c65e8
Fix URL loader example to use os/spawn
2021-11-11 17:33:25 +09: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
sogaiu
5ca6704c4d
Remove threads example
2021-08-21 14:52:51 +09:00
Calvin Rose
b75b3e3984
Working example for threaded channels.
...
Still no marshalling more complex values.
2021-08-15 15:25:07 -05:00
Calvin Rose
49f66a936c
Merge commit 'f4c9064b79d5b32fd74e5ddf25266356c22dd53b'
2021-04-29 15:58:41 -05:00
Calvin Rose
1baab5eb61
Remove typed arrays from the core.
...
Typed arrays will instead live in an external jpm nodule.
Also, changes have been made to `jpm` to allow other natives to use the
typedarray headers.
2021-04-29 12:33:49 -05:00
Andrew Chambers
f4c9064b79
Add config support for custom allocators.
2021-03-23 23:00:48 +13:00
Calvin Rose
8951b8de7a
Inherit the supervisor channel from the root fiber if not given.
2021-01-08 16:32:23 -06:00
Calvin Rose
4355420994
Remove function eachy
.
...
Instead use `each`.
2021-01-03 16:19:23 -06:00
Calvin Rose
c357af02c2
Allow iterating over fibers with each and similar.
2021-01-03 16:17:36 -06:00
Calvin Rose
0a1c93b869
Add ev api for making threaded calls.
...
Easy way to make arbitrary functions in C async.
2020-12-31 16:12:42 -06:00
Calvin Rose
788f91a36f
Remove unneeded book keeping for sub processes.
...
Since we are not using signals we no longer need some bookkeeping.
2020-12-31 11:52:12 -06:00
Calvin Rose
d6391f2d70
Get windows IOCP working for accept.
...
This also changes the api of servers slightly -
in light of having support for ev tasks, it is probably better
to remove the "simple" server code and replace it with some Janet
or remove it all together. While convenient, it has issues with error
handling and rigidity.
2020-11-08 18:56:13 -06:00
Calvin Rose
07910272e2
Get socket reads and writes working with IOCP.
2020-11-08 10:38:28 -06:00
Calvin Rose
1092013c2b
Merge branch 'master' into ev
2020-11-07 14:36:25 -06:00
Josef Pospíšil
9d41243c15
Fix comments formating
2020-11-04 10:18:31 +01:00
Josef Pospíšil
e33e182eb0
Fix assembly example
2020-11-04 10:16:02 +01:00
Calvin Rose
4d21b582c7
Improve reading and writing from streams.
...
Handle errors earlier, and allow 0 length packets from UDP
but not from TCP. This should more closely follow the exact specs
of send and recv calls.
2020-11-02 09:06:31 -06:00
Calvin Rose
813e3fdcfd
Merge branch 'windows-ev' into ev
2020-10-11 09:32:17 -05:00
Calvin Rose
bbe10e4938
Add another select example.
2020-10-11 09:14:31 -05:00
Calvin Rose
cb4903fa86
Overhaul of poll loop, redo ev/select.
2020-10-11 09:14:14 -05:00