Banner showing base of Eiffel tower

Github

Download version 1.4.8: Windows or Linux

Runtime Library: Concurrency

This library has 65 classes.

ECF: thread.ecf

Source code: directory list

Classes augmenting the classic EiffelThread library.

Work Distribution

Classes EL_PROCEDURE_DISTRIBUTER and EL_FUNCTION_DISTRIBUTER offer a convenient way to distribute the work of executing routines using a specific number of cores. See routine read_source_files in class EIFFEL_CONFIGURATION_FILE for an example.

Producer-Consumer Framework

A generic producer-consumer thread communication framework where a producing thread places products onto a queue for consumption by a consumer thread.

Features

Consumer Descendants

EL_CONSUMER* [P]
   EL_NONE_CONSUMER [P]
   EL_COUNT_CONSUMER*
      EL_COUNT_CONSUMER_MAIN_THREAD*
         EL_TIMED_PROCEDURE_MAIN_THREAD
      EL_TIMED_PROCEDURE*
         EL_TIMED_PROCEDURE_MAIN_THREAD
         EL_TIMED_PROCEDURE_THREAD
      EL_COUNT_CONSUMER_THREAD*
         EL_TIMED_PROCEDURE_THREAD
   EL_REGULAR_INTERVAL_EVENT_CONSUMER*
      EL_THREAD_REGULAR_INTERVAL_EVENT_CONSUMER*
      EL_MAIN_THREAD_REGULAR_INTERVAL_EVENT_CONSUMER*
   EL_CONSUMER_MAIN_THREAD* [P]
      EL_MAIN_THREAD_REGULAR_INTERVAL_EVENT_CONSUMER*
      EL_COUNT_CONSUMER_MAIN_THREAD*
      EL_PROCEDURE_CALL_CONSUMER_MAIN_THREAD
      EL_ACTION_ARGUMENTS_CONSUMER_MAIN_THREAD [ARGS -> TUPLE create default_create end]
   EL_PROCEDURE_CALL_CONSUMER*
      EL_PROCEDURE_CALL_CONSUMER_MAIN_THREAD
      EL_PROCEDURE_CALL_CONSUMER_THREAD
   EL_ACTION_ARGUMENTS_CONSUMER* [ARGS -> TUPLE create default_create end]
      EL_ACTION_ARGUMENTS_CONSUMER_MAIN_THREAD [ARGS -> TUPLE create default_create end]
      EL_ACTION_ARGUMENTS_CONSUMER_THREAD [ARGS -> TUPLE create default_create end]
         EL_BATCH_FILE_PROCESSING_THREAD*
            EL_LOGGED_BATCH_FILE_PROCESSING_THREAD*
   EL_CONSUMER_THREAD* [P]
      EL_THREAD_REGULAR_INTERVAL_EVENT_CONSUMER*
      EL_MANY_TO_ONE_CONSUMER_THREAD* [P]
      EL_ACTION_ARGUMENTS_CONSUMER_THREAD [ARGS -> TUPLE create default_create end]
      EL_COUNT_CONSUMER_THREAD*
      EL_PROCEDURE_CALL_CONSUMER_THREAD
      EL_DELEGATING_CONSUMER_THREAD [P, T -> EL_MANY_TO_ONE_CONSUMER_THREAD [P] create make end]

Product Queue Descendants

EL_THREAD_PRODUCT_QUEUE [P]
   EL_PROCEDURE_CALL_QUEUE
   EL_ONE_TO_MANY_THREAD_PRODUCT_QUEUE [P, T -> EL_MANY_TO_ONE_CONSUMER_THREAD [P] create make end]

Specialized Threads

The library includes many thread classes inheriting from EL_IDENTIFIED_THREAD_I that perform specialized tasks.

Examples

Descendants

EL_IDENTIFIED_THREAD_I*
   EL_IDENTIFIED_MAIN_THREAD
   EL_IDENTIFIED_THREAD*
      EL_LOGGED_IDENTIFIED_THREAD*
         SIMPLE_SERVER_THREAD
         EROS_SERVER_THREAD
      EL_CONTINUOUS_ACTION_THREAD*
         EL_WORK_DISTRIBUTION_THREAD
         EL_DORMANT_ACTION_LOOP_THREAD*
            EL_REGULAR_INTERVAL_EVENT_PRODUCER
         EL_RHYTHMIC_ACTION_THREAD*
            EL_TIMED_COUNT_PRODUCER
            EL_TIMEOUT
         EL_CONSUMER_THREAD* [P]
            EL_THREAD_REGULAR_INTERVAL_EVENT_CONSUMER*
            EL_MANY_TO_ONE_CONSUMER_THREAD* [P]
            EL_ACTION_ARGUMENTS_CONSUMER_THREAD [ARGS -> TUPLE create default_create end]
               EL_BATCH_FILE_PROCESSING_THREAD*
                  EL_LOGGED_BATCH_FILE_PROCESSING_THREAD*
            EL_COUNT_CONSUMER_THREAD*
               EL_TIMED_PROCEDURE_THREAD
            EL_PROCEDURE_CALL_CONSUMER_THREAD
            EL_DELEGATING_CONSUMER_THREAD [P, T -> EL_MANY_TO_ONE_CONSUMER_THREAD [P] create make end]
      EL_WORKER_THREAD
      EL_FILE_PROCESS_THREAD
         EL_LOGGED_FILE_PROCESS_THREAD

Other Features

Directory: library/runtime/concurrency

[ . ]

. /communication

. /communication/producer-consumer

. /communication/producer-consumer/consumer

. /communication/producer-consumer/distributer

. /communication/producer-consumer/procedure-call

. /communication/producer-consumer/timed

. /communication/producer-consumer/timed/counter

. /communication/producer-consumer/timed/events

. /communication/producer-consumer/timed/procedure-call

. /communication/proxy

. /structures

. /synchronization

. /thread-states

. /thread-types

[ . ]

EL_MUTEX_MAKEABLE_REFERENCE

Mutex for object conforming to EL_MAKEABLE and createable with call to make

EL_NAMED_THREAD

Named thread

Further Information

Click on class link to see client examples.

EL_SHARED_THREAD_MANAGER

Shared thread manager

EL_THREAD_DEVELOPER_CLASS

Developer class for code discovery/navigation purposes

Further Information

Click on class link to see client examples.

EL_THREAD_MANAGER

Thread manager

communication

EL_DEFAULT_MAIN_THREAD_EVENT_REQUEST_QUEUE

Saves event indexes for processing in descendant of EL_MAIN_THREAD_EVENT_REQUEST_QUEUE, EL_APPLICATION_IMP.

EL_EVENT_LISTENER_MAIN_THREAD_PROXY

Event listener main thread proxy

Further Information

Click on class link to see client examples.

EL_MAIN_THREAD_EVENT_REQUEST_QUEUE

Queue to notify an event listener from main application thread. A shared instance is accessible via EL_SHARED_MAIN_THREAD_EVENT_REQUEST_QUEUE

EL_SHARED_MAIN_THREAD_EVENT_REQUEST_QUEUE

Shared main thread event request queue

communication/producer-consumer

EL_ONE_TO_MANY_THREAD_PRODUCT_QUEUE

Product queue serviced by many consumers

EL_THREAD_PRODUCT_QUEUE

Thread safe queue

Further Information

Click on class link to see descendants.

communication/producer-consumer/consumer

EL_CONSUMER

Consumer of products placed by a separate thread into the queue:

product_queue: EL_THREAD_PRODUCT_QUEUE [P]

Further Information

Click on class link to see descendants.

EL_CONSUMER_MAIN_THREAD

Product consumer operating in main message_loop_callback GUI thread

Further Information

Click on class link to see client examples.

EL_CONSUMER_THREAD

Consumes the products placed into product queue by another thread

Further Information

Click on class link to see client examples.

EL_DELEGATING_CONSUMER_THREAD

Consumer thread that delegates consumption to multiple consumer threads

Further Information

Click on class link to see client examples.

EL_MANY_TO_ONE_CONSUMER_THREAD

Thread that delegates the work of processing items in a work queue to a pool of consumer threads.

Further Information

Click on class link to see client examples.

EL_NONE_CONSUMER

Do nothing consumer

communication/producer-consumer/distributer

EL_DISTRIBUTED_PROCEDURE_CALLBACK

Modify or complete a procedures operands as a task distributed across a pool of worker threads.

Further Information

Click on class link to see notes, descendants and client examples.

EL_FUNCTION_DISTRIBUTER

Descendant of EL_WORK_DISTRIBUTER specialized for functions. G is the return type of functions you wish to execute. For an example on how to use see class WORK_DISTRIBUTER_TEST_APP

Further Information

Click on class link to see client examples.

EL_PROCEDURE_DISTRIBUTER

Descendant of EL_WORK_DISTRIBUTER specialized for procedures. G is the target type of the procedures you wish to execute.

Further Information

Click on class link to see notes and client examples.

EL_WORK_DISTRIBUTER

Object to distribute work of applying routine-agents over a fixed number of CPU processors (threads)

Further Information

Click on class link to see descendants, instructions and client examples.

communication/producer-consumer/procedure-call

EL_ACTION_ARGUMENTS_CONSUMER

Consumer of arguments to an action or sequence of actions

EL_ACTION_ARGUMENTS_CONSUMER_MAIN_THREAD

Consumer of arguments to an action or sequence of actions using the main GUI thread

EL_ACTION_ARGUMENTS_CONSUMER_THREAD

Consumer of arguments to an action or sequence of actions using a spawned thread

EL_BATCH_FILE_PROCESSING_THREAD

Batch file processing thread

Further Information

Click on class link to see client examples.

EL_PROCEDURE_CALL_CONSUMER

Procedure call consumer

EL_PROCEDURE_CALL_CONSUMER_MAIN_THREAD

Procedure call consumer main thread

Further Information

Click on class link to see client examples.

EL_PROCEDURE_CALL_CONSUMER_THREAD

Procedure call consumer thread

Further Information

Click on class link to see client examples.

EL_PROCEDURE_CALL_QUEUE

Procedure call queue

Further Information

Click on class link to see client examples.

EL_SEPARATE_PROCEDURE

Separate procedure

Further Information

Click on class link to see client examples.

communication/producer-consumer/timed

EL_TIMEOUT

Repeatedly puts timer event onto a thread queue

Further Information

Click on class link to see client examples.

communication/producer-consumer/timed/counter

EL_COUNT_CONSUMER

Count consumer

EL_COUNT_CONSUMER_MAIN_THREAD

Count consumer main thread

Further Information

Click on class link to see client examples.

EL_COUNT_CONSUMER_THREAD

Count consumer thread

Further Information

Click on class link to see client examples.

EL_TIMED_COUNT_PRODUCER

Timed count producer

Further Information

Click on class link to see client examples.

communication/producer-consumer/timed/events

EL_MAIN_THREAD_REGULAR_INTERVAL_EVENT_CONSUMER

Main thread regular interval event consumer

Further Information

Click on class link to see client examples.

EL_REGULAR_INTERVAL_EVENT

Regular interval event

EL_REGULAR_INTERVAL_EVENT_CONSTANTS

Regular interval event constants

EL_REGULAR_INTERVAL_EVENT_CONSUMER

Regular interval event consumer

Further Information

Click on class link to see client examples.

EL_REGULAR_INTERVAL_EVENT_PROCESSOR

Regular interval event processor

EL_REGULAR_INTERVAL_EVENT_PRODUCER

Regular interval event producer

Further Information

Click on class link to see client examples.

EL_THREAD_REGULAR_INTERVAL_EVENT_CONSUMER

Thread regular interval event consumer

Further Information

Click on class link to see client examples.

communication/producer-consumer/timed/procedure-call

EL_TIMED_PROCEDURE

Timed procedure

Further Information

Click on class link to see client examples.

EL_TIMED_PROCEDURE_MAIN_THREAD

Timed procedure main thread

Further Information

Click on class link to see client examples.

EL_TIMED_PROCEDURE_THREAD

Timed procedure thread

Further Information

Click on class link to see client examples.

communication/proxy

EL_MAIN_THREAD_PROXY

Proxy object to (asynchronously) call procedures of BASE_TYPE from an external thread (non GUI thread)

EL_THREAD_PROXY

Proxy object to (asynchronously) call procedures of target type T from an another thread

Further Information

Click on class link to see client examples.

structures

EL_THREAD_SAFE_STACK

Thread safe stack

synchronization

EL_THREAD_BLOCK

Thread block

thread-states

EL_STATEFUL

Stateful

EL_STOPPABLE_THREAD

Stoppable thread

EL_SUSPENDABLE

Suspendable

EL_THREAD_CONSTANTS

Thread constants

thread-types

EL_CONTINUOUS_ACTION_THREAD

Continuous action thread

EL_DORMANT_ACTION_LOOP_THREAD

Thread that remains dormant until signalled to resume action loop

Further Information

Click on class link to see client examples.

EL_FILE_PROCESS_THREAD

Thread for file serialization with progress notification

Further Information

Click on class link to see client examples.

EL_IDENTIFIED_MAIN_THREAD

Identified main thread

EL_IDENTIFIED_THREAD

Identified internal_thread

EL_IDENTIFIED_THREAD_I

Abstract interface to a thread conforming to IDENTIFIED and EL_NAMED_THREAD

Further Information

Click on class link to see descendants.

EL_INTERNAL_THREAD

Internal thread for class EL_IDENTIFIED_THREAD

EL_INTERRUPTABLE_THREAD

Interruptable thread

Further Information

Click on class link to see client examples.

EL_RHYTHMIC_ACTION_THREAD

Repeats an action at timed intervals and prompts any registered responder May work but not fully tested.

Further Information

Click on class link to see client examples.

EL_TIMEOUT_THREAD

Timeout thread

Further Information

Click on class link to see client examples.

EL_WORKER_THREAD

Worker thread

Further Information

Click on class link to see client examples.

EL_WORK_DISTRIBUTION_THREAD

Thread that applies the set routine and then waits for a resume prompt to do another one.