You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- start the replacement of `thread_local` with macro `thrd_local` this macro will do emulation if feature not available in compiler or can be force to emulate if necessary. The macro create functions based off variable name.
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,6 @@ To be clear, this is a programming paradigm on structuring your code. Which can
14
14
15
15
You can read [Fibers, Oh My!](https://graphitemaster.github.io/fibers/) for a breakdown on how the actual context switch here is achieved by assembly. This library incorporates [libuv](http://docs.libuv.org) in a way that make providing callbacks unnecessary, same as in [Using C++ Resumable Functions with Libuv](https://devblogs.microsoft.com/cppblog/using-ibuv-with-c-resumable-functions/). **Libuv** is handling any hardware or multi-threading CPU access. This not necessary for library usage, the setup can be replaced with some other Event Loop library, or just disabled. There is a unmaintained [libasync](https://github.com/btrask/libasync) package tried combining **libco**, with **libuv** too, Linux only.
16
16
17
-
Two videos covering things to keep in mind about concurrency, [Building Scalable Deployments with Multiple Goroutines](https://www.youtube.com/watch?v=LNNaxHYFhw8) and [Detecting and Fixing Unbound Concurrency Problems](https://www.youtube.com/watch?v=gggi4GIvgrg).
18
-
19
17
## Table of Contents
20
18
21
19
*[Introduction](#introduction)
@@ -55,9 +53,13 @@ All internal functions that needs memory allocation is using these routines.
55
53
There will be at least one coroutine always present, the initial, required `co_main()`.
56
54
When a coroutine finish execution either by returning or exceptions, memory is released/freed.
57
55
56
+
> Note: This _resources management system_ outlined above has been _decoupled_ to _external libraries_ and now brought in as _dependencies_. Where the above is just wrapper calls to: [c-raii](https://github.com/zelang-dev/c-raii) for complete **Defer**, plus **C++ RAII** behavior, with an custom **malloc** replacement [rpmalloc](https://github.com/zelang-dev/rpmalloc), and emulated **C11 Threads and thread Pool**[cthread](https://github.com/zelang-dev/cthread).
57
+
58
+
- As such, the listed external libraries allow _smart auto memory management_ behaviors in any application, or any other **coroutine** library for that matter.
59
+
58
60
The other problem with **C** is the low level usage view. I initially started out with the concept of creating ***Yet Another Programming language***.
59
-
But after discovering [Cello High Level C](https://libcello.org/), and the general issues and need to still integrate with exiting C libraries.
60
-
This repo is now staging area the missing **C** runtime, [ZeLang](https://docs.zelang.dev). The documentation **WIP**.
61
+
62
+
But after discovering [Cello High Level C](https://libcello.org/), realizing the general issues and need to still integrate with exiting C libraries. This repo is now the staging area for the missing **C** runtime, [ZeLang](https://docs.zelang.dev). The documentation **WIP**, and source code hasn't been updated to recent changes in this library.
61
63
62
64
This **page**, `coroutine.h` and _examples folder_ files is the only current docs, but basic usage should be apparent.
63
65
The _coroutine execution_ part here is _completed_, but how it operates/behaves with other system resources is what still being developed and tested.
Copy file name to clipboardExpand all lines: docs/index.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,6 @@ To be clear, this is a programming paradigm on structuring your code. Which can
14
14
15
15
You can read [Fibers, Oh My!](https://graphitemaster.github.io/fibers/) for a breakdown on how the actual context switch here is achieved by assembly. This library incorporates [libuv](http://docs.libuv.org) in a way that make providing callbacks unnecessary, same as in [Using C++ Resumable Functions with Libuv](https://devblogs.microsoft.com/cppblog/using-ibuv-with-c-resumable-functions/). **Libuv** is handling any hardware or multi-threading CPU access. This not necessary for library usage, the setup can be replaced with some other Event Loop library, or just disabled. There is a unmaintained [libasync](https://github.com/btrask/libasync) package tried combining **libco**, with **libuv** too, Linux only.
16
16
17
-
Two videos covering things to keep in mind about concurrency, [Building Scalable Deployments with Multiple Goroutines](https://www.youtube.com/watch?v=LNNaxHYFhw8) and [Detecting and Fixing Unbound Concurrency Problems](https://www.youtube.com/watch?v=gggi4GIvgrg).
18
-
19
17
## Table of Contents
20
18
21
19
*[Introduction](#introduction)
@@ -55,9 +53,13 @@ All internal functions that needs memory allocation is using these routines.
55
53
There will be at least one coroutine always present, the initial, required `co_main()`.
56
54
When a coroutine finish execution either by returning or exceptions, memory is released/freed.
57
55
56
+
> Note: This _resources management system_ outlined above has been _decoupled_ to _external libraries_ and now brought in as _dependencies_. Where the above is just wrapper calls to: [c-raii](https://github.com/zelang-dev/c-raii) for complete **Defer**, plus **C++ RAII** behavior, with an custom **malloc** replacement [rpmalloc](https://github.com/zelang-dev/rpmalloc), and emulated **C11 Threads and thread Pool**[cthread](https://github.com/zelang-dev/cthread).
57
+
58
+
- As such, the listed external libraries allow _smart auto memory management_ behaviors in any application, or any other **coroutine** library for that matter.
59
+
58
60
The other problem with **C** is the low level usage view. I initially started out with the concept of creating ***Yet Another Programming language***.
59
-
But after discovering [Cello High Level C](https://libcello.org/), and the general issues and need to still integrate with exiting C libraries.
60
-
This repo is now staging area the missing **C** runtime, [ZeLang](https://docs.zelang.dev). The documentation **WIP**.
61
+
62
+
But after discovering [Cello High Level C](https://libcello.org/), realizing the general issues and need to still integrate with exiting C libraries. This repo is now the staging area for the missing **C** runtime, [ZeLang](https://docs.zelang.dev). The documentation **WIP**, and source code hasn't been updated to recent changes in this library.
61
63
62
64
This **page**, `coroutine.h` and _examples folder_ files is the only current docs, but basic usage should be apparent.
63
65
The _coroutine execution_ part here is _completed_, but how it operates/behaves with other system resources is what still being developed and tested.
0 commit comments