... | ... | @@ -3,7 +3,7 @@ An active object is an object that "runs" in a *separate thread*. |
|
|
|
|
|
It can be useful for in a situation in which an object has to periodically pop elements from a queue, which are in turn produced by a second thread or for example for a receiver object that has to continuously check for incoming messages.
|
|
|
|
|
|
### Interface
|
|
|
## Methods
|
|
|
|
|
|
In `src/shared/` you can find the corresponding template.
|
|
|
The most relevant functions are:
|
... | ... | @@ -13,7 +13,7 @@ The most relevant functions are: |
|
|
|
|
|
In order to start the active object you can call `start()` while you can call `stop()` in order to stop it.
|
|
|
|
|
|
### Example
|
|
|
## Example
|
|
|
|
|
|
```cpp
|
|
|
/*
|
... | ... | |