Lely core libraries  2.3.4
strand.c File Reference
#include "ev.h"
#include <lely/libc/stdatomic.h>
#include <lely/libc/threads.h>
#include <lely/ev/exec.h>
#include <lely/ev/strand.h>
#include <lely/ev/task.h>
#include <lely/util/errnum.h>
#include <lely/util/util.h>
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
Include dependency graph for strand.c:

Go to the source code of this file.

Data Structures

struct  ev_strand
 

Functions

ev_exec_tev_strand_create (ev_exec_t *inner_exec)
 Creates a strand executor. More...
 
void ev_strand_destroy (ev_exec_t *exec)
 Destroys a strand executor. More...
 
ev_exec_tev_strand_get_inner_exec (const ev_exec_t *exec)
 Returns a pointer to the inner executor of a strand.
 

Detailed Description

This file is part of the event library; it contains the implementation of the strand executor functions.

See also
lely/ev/strand.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 strand.c.

Function Documentation

◆ ev_strand_create()

ev_exec_t* ev_strand_create ( ev_exec_t inner_exec)

Creates a strand executor.

Parameters
inner_execa pointer to the inner executor used to execute the tasks.
Returns
a pointer to a new strand executor, or NULL on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 153 of file strand.c.

◆ ev_strand_destroy()

void ev_strand_destroy ( ev_exec_t exec)

Destroys a strand executor.

See also
ev_strand_create()

Definition at line 180 of file strand.c.