| 1041 | == tscb == |
| 1042 | * '''Author(s):''' Helge Bahmann |
| 1043 | * '''Version:''' 0.1 |
| 1044 | * '''State:''' |
| 1045 | * '''Last upload:''' 2008 Nov 23 |
| 1046 | * '''Links:''' [http://www.chaoticmind.net/~hcb/projects/libtscb Documentation] |
| 1047 | * '''Categories:''' [#ConcurrentProgramming Concurrent Programming] |
| 1048 | * '''Description:''' Thread-safe callback services. |
| 1049 | |
| 1050 | This library provides classes for notifications via callbacks in multi-threaded programs. In particular, it provides the following services: |
| 1051 | |
| 1052 | * Signals and slots: signal_proxy provides an interface through which interested receivers can connect/disconnect callback functions at runtime. signal provides an implementation of this interface and provides senders a mechanism to notify interested receivers, passing specified arguments to each callback function. |
| 1053 | * I/O readiness: ioready_service provides an interface through which interested receivers can register/deregister for notification on I/O readiness events (i.e. file descriptor ready for reading/writing; cf. poll/select). ioready_dispatcher provides an implementation of this interface that allows waiting (with timeout) for and fetching the required information from the operating system and notifying registered receivers. |
| 1054 | * Timers: timer_service provides an interface through which interested receivers can register/deregister for notification at specific points in time. timer-queue_dispatcher provides an implementation of this interface, keeping track of all pending timers, deadline when next timer is due, and "premature interruption" if the deadline must be invalidated (e.g. due to a newly-added timer). |
| 1055 | * Compound event dispatching (or "reactor-style" operation): posix_reactor_service combines the ioready_service, timer_service and workqueue_service interfaces. posix_reactor provides an implementation of this interface and performs all required operations of delivering all requested notifications. |
| 1056 | |
| 1057 | The implementations in this library provide strong thread-safety guarantees, are reentrant, deadlock-free and provide strong consistency guarantees. See section Concurrency and reentrancy below for an exact definition of the guarantees. |
| 1058 | |
| 1059 | --------------------------------------------------------------------------------------------------- |