Lely core libraries 2.3.4
fiber_exec.hpp File Reference

This header file is part of the event library; it contains the C++ interface for the fiber executor, mutex and condition variable. More...

#include <lely/ev/exec.hpp>
#include <lely/ev/fiber_exec.h>
#include <lely/ev/future.hpp>
#include <lely/util/fiber.hpp>
#include <mutex>
#include <utility>
Include dependency graph for fiber_exec.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  lely::ev::FiberThread
 Convenience class providing a RAII-style mechanism to ensure the calling thread can be used by fiber executors for the duration of a scoped block. More...
 
class  lely::ev::FiberExecutor
 A fiber executor. More...
 
class  lely::ev::detail::FiberMutexBase
 The base class for mutexes suitable for use in fibers. More...
 
class  lely::ev::FiberMutex
 A plain mutex suitable for use in fibers. More...
 
class  lely::ev::FiberRecursiveMutex
 A recursive mutex suitable for use in fibers. More...
 
class  lely::ev::FiberConditionVariable
 A condition variable suitable for use in fibers. More...
 

Functions

template<class T , class E >
void lely::ev::fiber_await (Future< T, E > f) noexcept
 
void lely::ev::fiber_yield () noexcept
 Yields a currently running fiber.
 

Detailed Description

This header file is part of the event library; it contains the C++ interface for the fiber executor, mutex and condition variable.

See also
lely/ev/fiber_exec.h
Author
J. S. Seldenthuis jseld.nosp@m.enth.nosp@m.uis@l.nosp@m.ely..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file fiber_exec.hpp.

Function Documentation

◆ fiber_await()

template<class T , class E >
void lely::ev::fiber_await ( Future< T, E f)
inlinenoexcept
See also
ev_fiber_await()

Definition at line 151 of file fiber_exec.hpp.

◆ fiber_yield()

void lely::ev::fiber_yield ( )
inlinenoexcept

Yields a currently running fiber.

This function MUST only be invoked from tasks submitted to a fiber executor.

See also
ev_fiber_await()

Definition at line 162 of file fiber_exec.hpp.