Even if this principle has been neglected by some fuorth generation languages (like Java or C#), this has been reaffirmed in fifth generation languages (like Python).
Wefts provides a small set of functions that does not require access to objects or classes, but are procedurally available in every thread or, in general, in every code using them.
Classes | |
class | Wefts::ThreadPtr< _T > |
Implements a very fast thread specific data. More... | |
Functions | |
bool | Wefts::Sleep (long seconds, long nanoseconds) |
Sleeps a certain amount of time. | |
bool | Wefts::Sleep (double seconds) |
Sleeps a certain amount of time. |
|
Sleeps a certain amount of time. Sleeps for a given amount of seconds (1.0 meaning one second, 0.5 half second and so on). The process calling this function will be awaken as soon as possible as the time is elapsed; this could also result in a noticeable delay. Also, it is possible that the process is awaken before the wait is elapsed; this may happen if a signal is issued to the process that is currently helding waiting threads.
|
|
Sleeps a certain amount of time. Sleeps for a given amount of seconds (that may be also 0), and of nanoseconds (up to 999,999,999, almost one second). The process calling this function will be awaken as soon as possible as the time is elapsed; this could also result in a noticeable delay. Also, it is possible that the process is awaken before the wait is elapsed; this may happen if a signal is issued to the process that is currently helding waiting threads.
|