MTasker 0.4 review

Download
by rbytes.net on

MTasker is a two-file C++ library designed to support very simple cooperative multitasking

License: GPL (GNU General Public License)
File size: 60K
Developer: Bert Hubert
0 stars award from rbytes.net

MTasker is a two-file C++ library designed to support very simple cooperative multitasking. MTasker can facilitate writing code that would ordinarily require a state machine, for which the author does not consider himself smart enough.

This class does not perform any magic it only makes calls to makecontext() and swapcontext(). Getting the details right however is complicated and MTasker does that for you.

If preemptive multitasking or more advanced concepts such as semaphores, locks or mutexes are required, the use of POSIX threads is advised.

MTasker is designed to offer the performance of statemachines while maintaining simple thread semantics. It is not a replacement for a full threading system.

What's New in This Release:
A theoretically damaging bug was fixed involving delete[] vs delete, spotted by Valgrind.
There is tentative Solaris support, not heavily tested.
Furthermore, a new method called numProcesses() was added so the kernel can query how many processes are running, and perhaps acting on that.

MTasker 0.4 keywords