Home » Developing U++ » UppHub » JobQueue: A simple and programmable job/queue model.
JobQueue: A simple and programmable job/queue model. [message #47724] |
Sat, 11 March 2017 21:47  |
Oblivion
Messages: 1202 Registered: August 2007
|
Senior Contributor |
|
|
Hello,
JobQueue is a helper base class, implementing through a standardized interface a simple, and programmable job/queue model, suitable mainly for, but not limited to, non-blocking (asynchronous) socket operations. It also allows batching. Note that this class isn't meant for multithreading.
This class (formerly "AsyncQueue") ise basically an abstraction of Upp's own HttpRequest class' asynchronous model, making use of C++11 features (Function type callbacks) and it can easily utilize lambda callbacks. Hence requires at least C++11.
It is also the backbone of my upcoming SSH (initial release) and NetworkProxy (new version) classes.
I also provided ClientSockets example, which is a non-blocking version of ClientSocket example (requires ServerSocket example).
The example demonstrates the usage of JobQueue and lambda callbacks.
Any criticism and suggestions are always welcome.
History:
-----------------------------
2017-03-18: A slight change to the API made: From now on error code can also be specified for halting.
GetError(): Added to the API, fixed const correctness.
Documentation updated accodingly.
2017-03-16: Pick() fixed. Error string was not picked.
2017-03-13: Documentation: Typo fixed.
2017-03-11: Initial release.
Regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sat, 18 March 2017 14:42] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 11:54:04 CEST 2025
Total time taken to generate the page: 0.00882 seconds
|