0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-03-31 23:11:33 +02:00

ircd::ctx: Add minor commentary.

This commit is contained in:
Jason Volk 2017-08-23 14:59:27 -06:00
parent 7197491364
commit a880e2e43e
3 changed files with 10 additions and 0 deletions
include/ircd/ctx
ircd

View file

@ -30,6 +30,10 @@ enum class cv_status
no_timeout, timeout
};
/**
* a dock is a condition variable which has no requirement for locking
* because the context system does not require mutual exclusion.
*/
class dock
{
std::deque<ctx *> q;

View file

@ -25,6 +25,11 @@
namespace ircd {
namespace ctx {
/**
* The mutex only allows one context to lock it and continue,
* additional contexts are queued. This can be used with std::
* locking concepts.
*/
class mutex
{
bool m;

View file

@ -802,6 +802,7 @@ ircd::ctx::ole::offload(const std::function<void ()> &func)
eptr = std::current_exception();
}
// To wake the context on the IRCd thread we give it the kick
strand(*context, kick);
});