Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IAsyncQueue.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IAsyncQueue.h (C) 2000-2019 */
9/* */
10/* Asynchronous queue allowing the exchange of information between threads. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_PARALLEL_THREAD_IASYNCQUEUE_H
13#define ARCANE_PARALLEL_THREAD_IASYNCQUEUE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
33{
34 public:
35
36 virtual ~IAsyncQueue() = default;
37
38 public:
39
41 virtual void push(void* v) = 0;
45 virtual void* pop() = 0;
49 virtual void* tryPop() = 0;
50
51 public:
52
53 static IAsyncQueue* createQueue();
54};
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/
58
59} // End namespace Arcane::MessagePassing
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64#endif
Arcane configuration file.
Asynchronous queue allowing the exchange of information between threads.
Definition IAsyncQueue.h:33
virtual void * pop()=0
Retrieves the first value from the queue and blocks if there are none.
virtual void push(void *v)=0
Adds v to the queue.
virtual void * tryPop()=0
Retrieves the first value if available. Returns nullptr otherwise.
Declarations of types and methods used by message exchange mechanisms.