Commit Graph

18 Commits

Author SHA1 Message Date
Christoffer Lerno
cdabe8fd9e - Create optional with ~ instead of ?. return io::EOF?; becomes return io::EOF~.
- Deprecated use of `?` to create optional.
2026-01-20 16:10:28 +01:00
Christoffer Lerno
26d733ef59 No optimization in test runner for MSVC 2025-12-31 00:45:35 +01:00
Christoffer Lerno
32d6025e29 Add panics just in case. 2025-12-31 00:43:19 +01:00
Manu Linares
d33d0a232b threaded test_suite_runner.c3 (#2642)
* threaded test_suite_runner.c3

- Added a simple threadpool
- Fixed the status line updates
- Implemented the #skip for tests
- Added ansi color to the final status line

It works as one expects reducing the total runner time by the allocated
number of threads.

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* fix thread_number and a test

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* added choice of "--thread [N]" or defaults to os::num_cpu()

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* added unique explicit --build-dir to the compiler

and also print the c3c command line for debugging

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* disable "run compiler tests" for msvc-debug build

it takes like 1:30hs

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* buffer printouts and correct ordering of tests

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* added progress bar

- removed some \r carrier return stuff

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* Fix bug in fixed pool. Improve progress bar

* Add color to bar.

* Some renaming.

* fix some leaky leaks

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* each test output is printed immediately

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>

* Formatting, remove comment. Re-enable MSVC debug test.

---------

Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
2025-12-21 14:34:16 +01:00
Sander van den Bosch
3f20e5af1d add join for ThreadPool without destroying the threads (#2579)
* add join for ThreadPool without destroying the threads
* Make the main Thread block waiting for the worker threads to finish instead of buzy looping and do proper initialization and freeing of all variables.
* Updated test to use `atomic_store` and  take into account the maximum queue size of the threadpool.
* - Add `ThreadPool` join function to wait for all threads to finish in the pool without destroying the threads.
- Return of Thread/Mutex/CondVar `destroy()` is now "@maydiscard" and should be ignored. It will return void in 0.8.0.
- Return of Mutex `unlock()` and `lock()` is now "@maydiscard" and should be ignored. They will return void in 0.8.0.
- Return of ConditionVariable `signal()` `broadcast()` and `wait()` are now "@maydiscard". They will return void in 0.8.0.
- Return of Thread `detatch()` is now "@maydiscard". It will return void in 0.8.0.
- Buffered/UnbufferedChannel, and both ThreadPools have `@maydiscard` on a set of functions. They will retunr void in 0.8.0.
- Pthread bindings correctly return Errno instead of CInt.
- Return of Thread `join()` is now "@maydiscard".

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
2025-12-06 23:54:04 +01:00
Christoffer Lerno
c9d9127da6 Deprecate foo.#bar. 2025-06-05 12:51:35 +02:00
Christoffer Lerno
7e100472e7 - AnyList now also defaults to the temp allocator.
- `os::getcwd` and `os::get_home_dir` requires an explicit allocator.
- `file::load_new` and `file::load_path_new` removed.
2025-03-18 18:34:52 +01:00
Christoffer Lerno
5c77c9a754 - Change distinct -> typedef.
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00
Christoffer Lerno
8b49e6c14d Rename def to alias. 2025-03-13 11:22:27 +01:00
Christoffer Lerno
25bccf4883 New faults and syntax (#2034)
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00
Christoffer Lerno
c0b80eccad Change @return! syntax to require ":" after faults. Update all contracts to consistently use ":" before the description. 2025-03-05 17:11:45 +01:00
Christoffer Lerno
31cd839063 Switch to <* *> docs. Fix issue with dynamically loaded C3 libs with other C3 code. 2024-10-14 02:14:34 +02:00
Christoffer Lerno
e3ea1d5049 Deprecate @adhoc, allow non-nested ad hoc generic types. 2024-10-08 11:02:10 +02:00
Christoffer Lerno
8e7efaae99 ThreadPool is now adhoc available. 2024-09-28 13:28:39 +02:00
Christoffer Lerno
8a0b0f5cf5 Disable fixed_pool where no threads are available. 2024-09-28 03:50:22 +02:00
Christoffer Lerno
5df321816b Unintended commit reverse. 2024-09-28 01:42:06 +02:00
Christoffer Lerno
7ff645c423 Free if broadcast fails. 2024-09-28 01:33:12 +02:00
Christoffer Lerno
93f290d57c Added a simple fixed threadpool which allocates. 2024-09-28 01:25:08 +02:00