|Carl Olsen ac62334f57 Snippets for a message pump class||5 years ago|
|c++-mode||5 years ago|
|doc||5 years ago|
|LICENSE||5 years ago|
|README.md||5 years ago|
Threads are great, coding it is not so much fun. Well, at least not writing it by hand. So by doing a YASnippet that do the boring work it is possible to focus on more fun things.
This snippet will create a skeleton class for a message pump. A message pump is a thread-based system that together with a queue receives a call and adds a (function) object to the queue, when the thread is ready it pulls the message and executes the object. This means that every call to the interface will be asynchronous, and returns immediately. The execution of the call will be based on when and where the thread is located in the queue. Its possible to add priority to the queue, but this is not done in this implementation. As mentioned before it is just a skeleton, its up to the user to actually do the fun stuff of creating what is needed.