Skip to content

Commit d195fab

Browse files
committed
[fiber] Remove default template arguments from docs
1 parent 7badc7d commit d195fab

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/modm/processing/fiber/module.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This module provides a lightweight stackful fiber implementation including a
44
simple round-robin scheduler. Here is a minimal example that blinks an LED:
55

66
```cpp
7-
modm::Fiber<> fiber([]
7+
modm::Fiber fiber([]
88
{
99
Board::LedBlue::setOutput();
1010
while(true)
@@ -25,9 +25,9 @@ int main()
2525
You can construct a fiber from any function without return type or arguments:
2626
2727
```cpp
28-
modm::Fiber<> fiber([]{});
28+
modm::Fiber fiber([]{});
2929
void function() {}
30-
modm::Fiber<> fiber2(function);
30+
modm::Fiber fiber2(function);
3131
```
3232

3333
To call objects with arguments, wrap the data into a lambda closure and
@@ -40,7 +40,7 @@ struct DataObject
4040
void member_function(int arg);
4141
} object;
4242
int number{42};
43-
modm::Fiber<> fiber([&]
43+
modm::Fiber fiber([&]
4444
{
4545
object.member_function(number);
4646
});
@@ -52,7 +52,7 @@ capture, or construct them in the capture directly, if they would get destroyed
5252
after fiber construction. You may need to mark the lambda mutable:
5353
5454
```cpp
55-
modm::Fiber<> fiber2([obj=std::move(object), obj2=DataObject()] mutable
55+
modm::Fiber fiber2([obj=std::move(object), obj2=DataObject()] mutable
5656
{
5757
obj.member_function(24);
5858
obj2.member_function(42);
@@ -68,7 +68,7 @@ A fiber can be passed a `modm::fiber::stop_token` to allow the fiber to be
6868
stopped cooperatively.
6969

7070
```cpp
71-
modm::Fiber<> fiber([](modm::fiber::stop_token stoken)
71+
modm::Fiber fiber([](modm::fiber::stop_token stoken)
7272
{
7373
// set up
7474
while(not stoken.stop_requested())
@@ -96,9 +96,9 @@ when it is ready, also from another fiber:
9696
9797
```cpp
9898
// fiber does not automatically start executing
99-
modm::Fiber<> fiber2(function, modm::fiber::Start::Later);
99+
modm::Fiber fiber2(function, modm::fiber::Start::Later);
100100
// fiber2 is automatically executing
101-
modm::Fiber<> fiber1([&]
101+
modm::Fiber fiber1([&]
102102
{
103103
modm::this_fiber::sleep_for(1s);
104104
fiber2.start();
@@ -115,7 +115,7 @@ restarts. If you need a fiber that is only callable once, you can implement this
115115
behavior manually with a boolean in the capture:
116116

117117
```cpp
118-
modm::Fiber<> fiber([ran=false]
118+
modm::Fiber fiber([ran=false]
119119
{
120120
if (ran) return;
121121
ran = true;
@@ -139,7 +139,7 @@ the fibers into the `.faststack` section, which is not zeroed and thus saves a
139139
bit of time on startup:
140140

141141
```cpp
142-
modm_faststack modm::Fiber<>(stack, function);
142+
modm_faststack modm::Fiber(stack, function);
143143
```
144144
145145
However, it may be desirable to control the placement of the fiber task
@@ -380,9 +380,9 @@ and task into the core-affine memory:
380380

381381
```cpp
382382
// allocate into core0 memory
383-
modm_faststack_core0 modm::Fiber<> fiber0(function);
383+
modm_faststack_core0 modm::Fiber fiber0(function);
384384
// allocate into core1 memory but DO NOT start yet!
385-
modm_faststack_core1 modm::Fiber<> fiber1(function, modm::fiber::Start::Later);
385+
modm_faststack_core1 modm::Fiber fiber1(function, modm::fiber::Start::Later);
386386

387387
void core1_main()
388388
{

0 commit comments

Comments
 (0)