|
Minecraft Community Edition 0.1.0
|
Platform-specific thread implementation. More...
#include <ThreadImpl.hpp>
Public Member Functions | |
| ThreadImpl (Thread *owner) | |
| Construct a ThreadImpl bound to its owner. | |
| void | wait () |
| Block until the associated thread exits. | |
| void | terminate () |
| Request termination of the associated thread. | |
| bool | isRunning () const |
Platform-specific thread implementation.
This class encapsulates native thread handles and provides a small interface for the Thread wrapper to control thread lifetime.
It is intentionally non-copyable (implicitly, due to native handles).
| mce::ThreadImpl::ThreadImpl | ( | Thread * | owner | ) |
Construct a ThreadImpl bound to its owner.
| owner | Pointer to the high-level Thread object that owns this implementation. |
The owner is stored by reference only for use inside the static entryPoint function to call back into Thread::run() or equivalent.
| void mce::ThreadImpl::terminate | ( | ) |
Request termination of the associated thread.
Implementations may signal the thread to stop or forcibly terminate the native thread handle depending on platform support and usage.
| void mce::ThreadImpl::wait | ( | ) |
Block until the associated thread exits.
On success this method returns after the remote thread has terminated. Behavior and error handling are platform-specific.