Commit Graph

105 Commits

Author SHA1 Message Date
Laytan Laats 604551eb2d wasi: make the demo run on wasi and run it in CI 2024-06-29 23:15:31 +02:00
Feoramund 0ea0fac2f9 Call pthread_cancel on Darwin, with advisory comment 2024-06-28 20:47:37 -04:00
Laytan Laats 00dfff7ee0 core/thread: fix a deadlock situation on unix 2024-06-07 20:28:09 +02:00
Feoramund 9dcf345795 Set thread pool is_running to false on shutdown 2024-06-02 14:54:32 -04:00
Feoramund 21064fbb60 Clear thread pool task data on restart 2024-06-02 14:54:32 -04:00
Feoramund 558c330028 Add task-stopping functionality to thread.Pool 2024-06-02 14:34:30 -04:00
gingerBill f9fd8f0c25 Merge pull request #3439 from andreas-jonsson/netbsd
NetBSD support
2024-05-15 10:33:52 +01:00
gingerBill 54ebfa6179 Fix hanging on thread.join for windows where the thread had not been started 2024-05-13 12:58:18 +01:00
Feoramund 33c6f75a2e Fix joining non-Started threads from blocking main thread 2024-05-10 17:24:45 -04:00
Andreas T Jonsson b72c2edabb Merge branch 'master' into netbsd 2024-05-10 09:04:52 +02:00
Feoramund 9cdb7b2584 Fix discrepancy with pthread cancelability state 2024-04-22 17:16:33 -04:00
Andreas T Jonsson 41d4dfbcd5 Fixed concurrency issue
Fixed broken thread policy causing deadlocks.
2024-04-18 16:20:49 +02:00
Andreas T Jonsson 38640d5d9e Updated core lib and did cleanup
Updated core with some path related functions and did some minor code cleanup.
Most of the standard library function is just a matter of copy what is there for the other BSDs.
2024-04-18 10:12:42 +02:00
Andreas T Jonsson 4558f3992a Initial commit of NetBSD port 2024-04-16 14:27:29 +02:00
gingerBill 29e5f94c2a Add #no_broadcast procedure parameter to disallow automatic array programming broadcasting on procedure arguments 2024-03-21 11:52:48 +00:00
avanspector fca691a066 fix core:thread and a memory leak
in the future probably native non-pthread implementation for haiku will be required
2024-02-27 02:38:06 +01:00
gingerBill 3e7e779abf Replace core:* to base:* where appropriate 2024-01-28 22:18:51 +00:00
gingerBill 90ac400ec5 stdcall -> system 2024-01-17 17:25:23 +00:00
Laytan Laats 9078ddaf5a Allow larger thread poly data
The poly data currently has the restriction of being less than a
pointer's size, but there is much more space in the `Thread.user_args`
array which can be utilized, this commit allows you to pass types that are
larger than pointer length as long as the total size of the poly data is
less than that of the `Thread.user_args`.
2023-11-15 19:08:03 +01:00
flysand7 270348b112 [core]: Remove do keyword from the core library 2023-11-11 20:36:38 +11:00
gingerBill 2cc22d118d Require parentheses for #align(N) 2023-08-15 14:55:02 +01:00
gingerBill 44ea82f845 Clean up usage of using throughout core and vendor 2023-07-31 11:46:40 +01:00
gingerBill 3dec55f009 Replace x in &y Use &v in y syntax through core & vendor for switch/for statements 2023-06-26 15:42:57 +01:00
hikari 3b8515beb0 [core:thread] Seeing if this fixes network tests 2023-06-07 20:52:41 +03:00
hikari 7b62b81ebd [core:thread] Fix compilation 2023-06-07 20:03:19 +03:00
hikari dcf4e51787 [core:thread] Added self_cleanup flag to properly auto-clean threads 2023-06-07 19:11:16 +03:00
Tetralux 5d6b923244 [thread] Refactor handling of 'init_context' + add doc comments for it 2023-06-03 08:08:18 +00:00
gingerBill c194dfbdf7 Remove thread.init_context = context 2023-05-31 22:23:47 +01:00
Dragos Popescu b2ecb37b35 Changed js panics to unimplemented where sensible 2023-03-22 12:10:27 +01:00
Dragos Popescu ef3d8bdc42 Fixed more compile time errors when including os and thread to js targets 2023-03-21 04:17:31 +01:00
Dragos Popescu adac039a2b Made most libraries panic on js targets instead of not compiling 2023-03-20 04:08:48 +01:00
Jeroen van Rijn 85edcf9cc2 Revert. 2022-05-14 13:34:52 +02:00
Jeroen van Rijn 6c0e2e2a53 pool_join should look at .Done. 2022-05-14 13:18:38 +02:00
Jeroen van Rijn 42371f7aea Fix fix. 2022-05-13 15:25:20 +02:00
Jeroen van Rijn 58fc305b11 Do a bit less work for pool_join. 2022-05-13 15:11:33 +02:00
Jeroen van Rijn 7e0c359f99 Fix thread pool join. 2022-05-13 15:03:40 +02:00
Jeroen van Rijn f4ad4c7aa6 Disable thread.terminate on Darwin for now. 2022-05-11 16:17:35 +02:00
Jeroen van Rijn 8fb718245a Implement pthread_cancel. 2022-05-11 15:52:04 +02:00
Jeroen van Rijn 56e3b7cb7d Fix join on *nix. 2022-05-11 13:43:29 +02:00
Thimilius d48d3bfa87 Fix join_multiple typo 2022-05-11 13:12:56 +02:00
Florian Behr ee67a0b9a1 reorder procedure parameters to make sure the optional argument in pool_add_task() is last, and the argument order is consistent with pool_init() 2022-04-25 14:08:09 +02:00
Florian Behr ca6a1db757 fix doc comment for pool_init 2022-04-25 13:41:39 +02:00
Florian Behr e01662c139 Make allocator in pool_add_task() explicit 2022-04-25 13:23:05 +02:00
gingerBill 22b961ea53 Update Thread Pool in core:thread
Thanks to the work of eisbehr
2022-03-31 11:55:46 +01:00
gingerBill 97a183f412 Clean up thread_windows.odin 2022-03-31 01:13:29 +01:00
gingerBill 4eb4ae6305 Replace sync with sync2 2022-03-30 17:42:44 +01:00
Dale Weiler 3da8fa9b27 can use sync.guard here 2022-03-11 08:41:03 -05:00
Dale Weiler 32ba5e7ad2 formatting 2022-03-11 08:36:04 -05:00
Dale Weiler 52df80dccd fix for mac & use atomic store on write side to avoid race 2022-03-11 08:35:23 -05:00
Dale Weiler 7f845bb165 fix for spurious wakeups 2022-03-11 08:30:03 -05:00