logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ost::Runlist - A runlist is used to restrict concurrent exection to a limited set of concurrent sessions,

Author

       Generated automatically by Doxygen for GNU CommonC++ from the source code.

GNU CommonC++                                    Sun Dec 27 2020                                 ost::Runlist(3)

Constructor & Destructor Documentation

ost::Runlist::Runlist(unsignedcount=1)
       Create a new runlist with a specified limit.

       Parameterscount limit before wait queuing.

Detailed Description

       A runlist is used to restrict concurrent exection to a limited set of concurrent sessions, much like a
       semaphore.

       However, the runlist differs in that it notifies objects when they become ready to run, rather than
       requiring them to wait and 'block' for the semaphore count to become low enough to continue.

       Author
           David Sugar dyfet@ostel.com

       list of runable objects.

Member Data Documentation

unsignedost::Runlist::limit[protected]unsignedost::Runlist::used[protected]

Member Function Documentation

boolost::Runlist::add(Runable*run)
       Add a runable object to this runlist. If the number of entries running is below the limit, then add
       returns true otherwise the entry is added to the list.

       Returns
           true if immediately ready to run

       Parametersrun pointer to runable object.

   voidost::Runlist::check(void)[protected]voidost::Runlist::del(Runable*run)
       Remove a runable object from the wait list or notify when it is done running so that the used count can
       be decremented.

       Parametersrun pointer to runable object.

   voidost::Runlist::set(unsignedlimit)
       Set the limit.

       Parameterslimit to use.

Name

       ost::Runlist - A runlist is used to restrict concurrent exection to a limited set of concurrent sessions,
       much like a semaphore.

Synopsis

       #include <misc.h>

       Inherits ost::Mutex.

   PublicMemberFunctionsRunlist (unsigned count=1)
           Create a new runlist with a specified limit.
       bool add (Runable *run)
           Add a runable object to this runlist.
       void del (Runable *run)
           Remove a runable object from the wait list or notify when it is done running so that the used count
           can be decremented.
       void set (unsigned limit)
           Set the limit.

   ProtectedMemberFunctions
       void check (void)

   ProtectedAttributes
       unsigned limit
       unsigned usedAdditionalInheritedMembers

See Also